How to cancel a Members old subscription when they buy a new one? (automatically)

Hello,

I’ve got multiple subscription options with my Wix-Pricing-Plans, but they’re made such that it only makes sense to have one at a time. People might want to upgrade or downgrade, but holding two subscriptions at once makes no sense and would be a bad experience for my members / customers.

Unfortunately, the default Wix-Pricing-Plans works such that people just stack subscriptions on top of each other, which is of no interest to me, my website, nor my members / customers.

So - how do I make sure that the “currently active” subscription is canceled when a member decides to subscribe to a new one?

I don’t mind if it involves Velo code, I’m already in deep with developer mode.

Cheers!

@kreativthold It sounds like it might be under this feature request - Pricing Plans Request: Ability to Switch Plans | Help Center | Wix.com (be sure to vote :raised_hands: )

If you’re interested in exploring code, you’re probably looking at using some event like, onPlanPurchased() or onOrderPurchased( ), so when a plan is purchased, you get the other plans that an account has and cancel them.

I haven’t tried this myself, so can’t say for certain if it’s the best approach. Let us know how you get on! :slight_smile:

1 Like

Thanks @noahlovell

I’m unsure where I should add that code:

  • On the pricing plan page of my site (the standard one the comes with the app)?

  • On the check-out page (if that’s even accessible?) ?

  • Or Should I build my own plan page from scratch?

This would go in the events.js file of the site to listen to the events, and then the logic might go in another and be imported.

There are a few different approaches, but it’s likely revolving around the events.js file :slight_smile:

1 Like

Alright, I’ll mark it as a solution for now. Thanks

X

1 Like