Skip to content

Instantly share code, notes, and snippets.

@thenbrent
Created February 7, 2014 19:31
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thenbrent/8870062 to your computer and use it in GitHub Desktop.
Save thenbrent/8870062 to your computer and use it in GitHub Desktop.
A simple plugin to stop WooCommerce Subscriptions from changing users' roles.
<?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 );
@wmacmill
Copy link

wmacmill commented Apr 8, 2015

Works perfectly thanks!

@otjutt
Copy link

otjutt commented May 25, 2015

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