Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

commented Apr 8, 2015

Works perfectly thanks!

@otjutt

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.