How do I deactivate a plugin for some roles
This is actually a basic PHP problem: if (in_array(‘Participant’, ‘Subscriber’, $current_user->roles)) { That’s not how in_array works. in_array checks if the first bit is in the second bit. So is Participant inside $current_user->roles. What you’ve written however, checks if Participant is inside Subscriber, then passed an array as the 3rd argument, which is meant to … Read more