[Resolved] [Plugin: eShop] Feature Request (Requires Addition of ONE LINE)
Hey, I was just wondering if this plugin could possibly be updated to hide the add to cart form on single.php (or page.php, wherever people are adding items) when it’s a post scheduled to publish in the future? I’ve already hacked the current version to do it, but am trying to avoid having to go in and re-edit every time the plugin is upgraded. It only requires the addition of one line to eshop-add-cart.php as follows:
if ($post->post_status == 'future') $stkav = '0';
That makes it so that the add to cart form can be filled out on the backend, schedule the post/page for publishing, and the form itself won’t be rendered until the post/page actually goes live. The author can then just let WP take over and be assured that their item won’t be offered for sale until they’ve specified. Very useful for people (like myself) who might want to use a custom template with a “post_status=future” query to allow the public to preview items that will be up for sale sometime in the future 😉
Special thanks to KostasDi and sha1sum from #wordpress IRC for helping me out with this!
- The topic ‘[Resolved] [Plugin: eShop] Feature Request (Requires Addition of ONE LINE)’ is closed to new replies.