We need to create a coupon that will offer different discounts for each product category, something like what this plugin does: https://www.flycart.org/blog/wordpress/how-to-use-one-coupon-code-for-multiple-discounts-in-woocommerce
So what we need is to have a single coupon that offers the client:
– x% discount for the Product Category A
– y% discount for the Product Category B
This has to happen even when we have product from both categories in the cart.
If there are both cats in the cart then each cat has to have its own discount percentage applied. The module above manages to do that.
Is there a code snippet that can achieve this, or it’s better to go and by the plugin?
Getting a custom snippet coded will probably cost you more than the plugin itself. I’d try the plugin first, and if it works then that’s a better choice in my opinion