Created
June 21, 2018 21:11
-
-
Save nikitasinelnikov/e80843e15c37afc93e8310e7a6fb0027 to your computer and use it in GitHub Desktop.
Disable role changing by Woo:Subscriptions
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
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