Hi there,
Thank you for your question! If you’d like a coupon to apply only to products from one specific category in the cart, and not to other categories, this requires a bit of configuration. Unfortunately, WooCommerce’s default coupon settings do not include a way to exclude other categories dynamically if multiple categories are in the cart. However, here are a couple of approaches you can consider:1.
Default WooCommerce Coupon Settings: You can limit a coupon to apply only to specific categories.
- Go to WooCommerce > Marketing > Coupons and edit the coupon.
- Under the Usage Restrictions tab, set the category in the Product Categories field.
- This will ensure the coupon applies only to products from the selected category.
However, keep in mind that WooCommerce will apply the coupon to all products in the selected category, even if other categories are also in the cart.
To apply a coupon to only one category and exclude others dynamically when multiple categories are in the cart you can use custom plugin or custom code.
If you need more in-depth support or want to consider professional assistance for customization, I can recommend?WooExperts?and?Codeable.io?as options for getting professional help. Alternatively, you can also ask your development questions in the??WooCommerce Community Slack?as custom code falls outside our usual?scope of support.
Thank you