• Resolved awesomeflyingdude

    (@awesomeflyingdude)


    Hi! Thank you so much for this great plugin!

    I have a client that wants to give a $30 discount for every $100 spent (cart total). They do not want a 30% discount applied for anything from $100-$199, just the flat $30. At $200, it would be a $60 discount, all the way up to at least $5,000. Is there a way to use your plugin to do this? I started creating coupons for each increment (100-199, 200-299, etc.), but I’d rather not have to manually create all of them. I’m good enough with PHP to either write a script to generate all of those coupons, or write one script that will apply the discount to each order. Can you point me in the direction for the best way to accomplish this?

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author Soft79

    (@josk79)

    I think you could use the woocommerce_coupon_get_amount filter for that. In that filter you count the cart subtotal, and set the coupon amound based on that value.

    I haven’t tested this though.

Viewing 1 replies (of 1 total)
  • The topic ‘Programmatically Generate Coupons (or Dynamically Apply Discounts)’ is closed to new replies.