Skip to content

Instantly share code, notes, and snippets.

@nikitasinelnikov
Created June 21, 2018 21:11
Show Gist options
  • Save nikitasinelnikov/e80843e15c37afc93e8310e7a6fb0027 to your computer and use it in GitHub Desktop.
Save nikitasinelnikov/e80843e15c37afc93e8310e7a6fb0027 to your computer and use it in GitHub Desktop.
Disable role changing by Woo:Subscriptions
add_filter( 'woocommerce_subscriptions_update_users_role', 'my_custom_disable_wcs_role_change', 10, 3 );
function my_custom_disable_wcs_role_change( $enable, $user, $role_new ) {
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment