开发者 | wpcentrics |
---|---|
更新时间 | 2024年11月19日 08:19 |
捐献地址: | 去捐款 |
PHP版本: | 7.0 及以上 |
WordPress版本: | 6.7 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
On admin side, go to WooCommerce > Coming Soon config
The plugin don't does it for now, there is two ways on WooCommerce to lock a product purchase:
Enter on a product edition, and activate the checkbox labeled "Show Coming Soon badge", just below the publication date. Then save the product.
Well, we can't sure 100% you, but we're coded the plugin following the standard WooCommerce template system, and should work well on every theme. In any case, we're writed it taking care that doesn't break the layout if it not works. Please, write us on the support forum to tell us about: whether to say if it works well, or not with your theme. It will help us and others, and we will try to make it works for you it it doesn't.
Comming Soon for WooCommerce works with the actions found in the standard product loop and single product templates. The used actions to print the badge code are: For single product: do_action( 'woocommerce_after_main_content' ); For product loop: do_action( 'woocommerce_shop_loop_item_title' ); You can find this actions in the templates: wp-content/plugins/woocommerce/templates/single-product.php (single product template) wp-content/plugins/woocommerce/templates/content-product.php (print each product on loop) ...if you want to override this files on your WooCommerce child theme, or you're coding one from scratch, maybe you have the same file names on your theme folder: wp-content/themes/your-theme/woocommerce/content-product.php wp-content/themes/your-theme/woocommerce/single-product.php in this case, simply check you've this actions on your code: For single product: do_action( 'woocommerce_after_main_content' ); For product loop: do_action( 'woocommerce_shop_loop_item_title' ); ...and Coming Soon for WooCommerce will do the rest :)
The plugin can't guess your theme font-family or product thumbnail size, so maybe you should adjust a bit the text and badge size.