1

I'm looking for a way to apply coupons to existing woocommerce subscriptions. I create coupons and then under usage restrictions I set the allowed emails to the be the email of a certain user/subscriber.

I would like these coupons to be automatically applied to the users subscription. I want the discount to be visible on the users subscription page. That way it's clear for the user how much the subscription will be discounted on the next renewal.

Is there an easy way to achieve this?

I was hoping I could something with the wcs_get_users_subscriptions filter and then add a function which applies coupons to existing coupons from there?

GW123
  • 23
  • 5
  • 1
    I don't think that this is possible as the subscription amount is handled by the payment gateway once a subscription has been made. Woocommerce only get sync with the payment gateway after, so you can't apply a discount afterwards (I think, not completely sure). – LoicTheAztec Oct 09 '19 at 15:50
  • 1
    I think it's actually possible, since wcs will manage the subscription and sends the charge request to the gateway once it triggered using Cron. But, the question is too broad. Do you have a list of emails you would like to search and apply the coupon to matching orders? – Shir Gans Oct 10 '19 at 03:45
  • interesting, would the coupons have to be applied when a payment attempt is made or can the coupons be applied without charging the client? I guess the email list I would like to search is a list of existing customers with existing subscriptions. – GW123 Oct 10 '19 at 19:15
  • 1
    did you ever figure out a solution for this? I would love to do the same thing. – Josh_Katz Apr 20 '20 at 19:25

0 Answers0