• Resolved hcmendez

    (@hcmendez)


    Hi, I have an issue with my users not being able to see or access the discount when they have more than 1 wholesale role. Currently, we have four custom roles for wholesale and all of my users will always have at least two of them at the same time, and your plugin doesn’t seem to recognize all of my users’ roles, it only recognizes one.

    For my role management, I’ve used three plugins:
    User Role Editor
    Multiple Roles
    HM Multiple Roles

    How can I make it so your plugin works with my users multiple roles?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Jeff Alvarez

    (@superlemon1998)

    Hi @hcmendez ,

    The free version of Wholesale Suite currently does not allow users to create multiple wholesale roles. I’ll assume that you’ve created a custom role outside wholesale suite?

    If this were the case there shouldn’t be conflicts, assuming the roles assigned don’t conflict against one another. Also, we generally don’t recommend having wholesale customers have multiple wholesale/regular roles as there’s a chance the permissions might conflict.

    I also noticed that you have multiple role plugins, it could be that it’s conflicting. I’d suggest following our standard debug:How To Conduct A Basic Debug For Wholesale Suite – Wholesale Suite (wholesalesuiteplugin.com)

    Also, you can use this snippet to check if the logged-in customer’s role is being read properly. It’ll print out some text on the header/frontend with the assigned roles Screenshot by Lightshot (prnt.sc):

    add_action( 'wp_head', 'my_get_current_user_roles');
     
    function my_get_current_user_roles() {
     
      if( is_user_logged_in() ) {
     
        $user = wp_get_current_user();
     
        $roles = ( array ) $user->roles;
     
        //return $roles; // This will returns an array
    	var_dump($roles);
        return array_values($roles);
     
      } else {
     
        return array();
     
      }
     
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Not recognizing user multiple roles’ is closed to new replies.