I'm using WooCommerce Subscriptions plugin and I would like to stop user role changing only when canceling a subscription.
I found a code snippet here:
add_filter( 'woocommerce_subscriptions_update_users_role', '__return_false', 100 );
… which Stop WooCommerce Subscriptions Changing a User's Role. This will stop role changing when purchasing a subscription too.
What I would like is to stop user role changing only when canceling a subscription.
Is it possible?
Thanks