A simple plugin to stop WooCommerce Subscriptions from changing users' roles.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Stop WooCommerce Subscriptions Changing a User's Role | |
* Plugin URI: | |
* Description: | |
* Author: Brent Shepherd | |
* Author URI: | |
* Version: 1.0 | |
*/ | |
add_filter( 'woocommerce_subscriptions_update_users_role', '__return_false', 100 ); |
I wonder why WooCommerce Subscriptions will change user roles by default :-( ... I'm working on a client's project and we have "WPFront User Role Editor" plugin installed. That site depends heavily on user roles and it was strange to see how WooCommerce Subscriptions brutally removed all the user roles :-(
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works perfectly thanks!