I have to apply a 10% discount if the buyer is an affilate AND if the $cart_subtotal < 100
I was thinking about writing a function, but how can I check if the user in an affilate?
Do you have an alternative solution in mind?
Thank you
I have to apply a 10% discount if the buyer is an affilate AND if the $cart_subtotal < 100
I was thinking about writing a function, but how can I check if the user in an affilate?
Do you have an alternative solution in mind?
Thank you
Follow us! We post news and tutorials related to our tools, WordPress and WooCommerce on these platforms:
Hi Rocco,
I also think you need a custom function for this and IMO the easiest way would be to apply a predefined coupon if the conditions are met. In order to check if the customer is an affiliate you should use the function affiliates_get_user_affiliate.
Hope it helps.
Cheers,
George