Dynamically change user role with membership status
Memberships provides built-in perks for members, which can let you provide discounts or VIP content for members. However, you may want to leverage other plugins, such as Dynamic Pricing, to allow for tiered discounts. Many other plugins can use user roles built into WordPress to do this. Memberships intentionally does not store its data as part of the user or roles to make querying data and customizing the plugin simpler, but with this plugin, you can add role changes on top of user memberships.
You select what role should be used when a member is active, and when inactive (the User Role Editor plugin is helpful to create roles!), and then when memberships status changes, user role is updated as well.
Using this plugin
First, configure which roles should be used for active and inactive members under WooCommerce > Settings > Memberships > General.
That’s all you need 🙂 Now, when a user membership changes status, the plugin will handle updates of roles as well.
Note that these settings are not retroactive, so if you have existing members, you may need to adjust their roles manually.
If you’d like to get automatic updates, you’ll need a license key to get them from our site as we release new versions. You can do so by checking the email you got after downloading the plugin, or your purchase receipt page.
Now copy this key, and on your site, navigate to WooCommerce > Extensions > SkyVerge Licenses. Enter the key you’ve copied, and save your changes. This will now link your site for automatic updates.
Once you’ve saved your updater key, you’ll get notifications of updates to this plugin so you can automatically upgrade.
As this is a free plugin, we’re not able to offer detailed troubleshooting assistance. We recommend taking the following steps if you experience issues with role changes:
- Please double-check that no other plugins are influencing role. For example, if you use Subscriptions tied to Memberships, we do not recommend using this plugin, as role handling should be left to Subscriptions instead.
- To rule out plugin conflicts, please deactivate all plugins except WooCommerce, WooCommerce Memberships, and WC Memberships Role Handler, then re-test to see if the issue has been resolved.
- If you still see an issues with role changes, please switch to a default theme, such as Twenty Seventeen, and test again with the default theme and no other plugins.
These steps resolve almost any issue. If you’re looking for assistance with customizing the plugin functionality, we recommend reaching out to Wisdm Labs or Codeable for assistance with these sort of projects.