How can I stop Subscriptions from changing a user’s role?

WooCommerce Subscriptions changes a user’s role by default, when the status of their subscription or subscriptions change, as explained in the Role Settings document.

However, it is possible to stop this default behaviour with a small amount of custom code. This setup is helpful when you implement a custom user role or logic on a site and need to keep other user roles assigned when someone subscribes. Below, you’ll find a simple plugin demonstrating how to achieve this.

Note: We are unable to provide support for customizations under our Support Policy. If you need to further customize a snippet, or extend its functionality, we highly recommend Codeable, or a Certified WooExpert.

View on Github