Yith, Cancel subscription -> Delete corresponding user role. & reverse
-
I am working on a setup with yith + woocommerce.
In short:
A user buys a subscription, the user roles are flushed, new role added. (Good).
The roles are all flushed from the user account (Upon buying a new subscription) in our code.
Now inside yith, when user roles are flushed and the new role added(subscription) the old order_id->subscription_id isnt cancelled, we would like the subscription to be cancelled when the corresponding user role is gone. we thought this would be a feature in your plugin?
Any help is appreciated, im fairly new with this so im trying to understand.
I have tried to code some of it myself.
Gist:
https://gist.github.com/xAirx/762f6ae2441d7bb79ade74bd641c8b47
- The topic ‘Yith, Cancel subscription -> Delete corresponding user role. & reverse’ is closed to new replies.