Wordpress

add and remove permission/ add user capability to access specific plugin or data by user role

copy or paste the below code into functions.php file

  add_action( 'init', 'user_role_permision');
    function user_role_permision() {
     
        $role = get_role('dc_vendor');
       //$role->add_cap("import");
      // $role->remove_cap("manage_woocommerce");
    }

Advertisement

Did you find this helpful? Share it!

Leave a Comment

Your email address will not be published. Required fields are marked