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 customize a snippet or extend its functionality, we recommend working with a Woo Agency Partner or finding a WooCommerce developer on Codeable.

View on Github
Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.