Desactivate Terawallet for a specific user role
-
Hi, I need to deactivate Terawallet for a specific user role. I use the following snippet code which works perfectly for any other plugin installed on my website.
add_action(‘admin_init’, ‘desactivate_plugin_wallet’);
function desactivate_plugin_wallet()
{
global $current_user;
if (in_array(‘specific_role’, $current_user->roles)) {
deactivate_plugins( ‘/woo-wallet/woo-wallet.php’ );
} else {
activate_plugins( ‘/ woo-wallet/woo-wallet.php’ );
}
}However for Terawallet it does not! Why? Please help.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Desactivate Terawallet for a specific user role’ is closed to new replies.