skip to Main Content

Deactivate wordpress plugin for a specific user role

I'm trying to deactivate the (TeraWallet) plugin for all user roles only allow the subscriber roles. I'm using this code to deactivate the plugin for the customer role: function desactivate_plugin_wallet() { global $current_user; if (in_array('customer', $current_user->roles)) { deactivate_plugins('/woo-wallet/woo-wallet.php'); } else…

VIEW QUESTION
Back To Top
Search