• Resolved jnoveske

    (@jnoveske)


    I’ve installed this plugin and it works great except my client has ‘shop_manager’ role and cannot upgrade a ‘customer’ role to a wholesale_customer’ role. Do you have a filter or snippet to allow this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jnoveske

    (@jnoveske)

    I found this snippet of code and it appears to work. Maybe someone can confirm this is the correct solution.

    function myextension_shop_manager_role_edit_capabilities( $roles ) {
        $roles[] = 'wholesale_customer';
        return $roles;
    }
    add_filter( 'woocommerce_shop_manager_editable_roles', 'myextension_shop_manager_role_edit_capabilities' );

    Hi @jnoveske,

    Thanks for contacting us here!

    According to the WooCommerce documentation, you should be able to use that snippet to change the user role of your customers when logging in as a shop manager.

    I’ve already tested it and it should be working properly. If you wish to add more wholesale role to choose from, just add the wholesale meta key found in your WooCommerce > Wholesale roles.

    Let me know if there’s anything else that I can assist you with!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘allow shop manager to change customer role’ is closed to new replies.