| 开发者 | runthingsdev |
|---|---|
| 更新时间 | 2026年1月7日 20:49 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv3 or later |
| 版权网址: | 版权信息 |
/wp-content/plugins/runthings-wc-coupons-required-products directory, or install the plugin through the WordPress plugins screen directly.The built-in WooCommerce "Products" field allows you to specify products that the coupon can be applied to. This means that the discount will be applied if any of the specified products are in the cart. In contrast, this plugin restricts the usage of the coupon unless all of the specified products are in the cart. This means that the coupon will not be valid unless every required product is present in the cart.
Edit the coupon and go to the "Usage restriction" tab. In the "Required products" section, select the products that must be in the cart for the coupon to be valid.
Yes, this plugin works alongside other WooCommerce coupon restrictions such as minimum spend, maximum spend, and role restrictions.
The plugin has been kept deliberately simple for now, because this met the clients specific needs. There are lots of other combinations of requirements that I can think of like excluding products, involving quantities, requiring x products in a category, etc. If you have a specific requirement, and time allows, I'll try to implement it. Please open an issue on the GitHub repo, over at https://github.com/runthings-dev/runthings-wc-coupons-required-products
runthings_wc_coupons_required_products_error_message to customize error message.runthings_wc_coupon_required_products_error_message deprecated.runthings_wc_coupon_required_products_error_message to customize error message.