How to allow Shop Managers to edit Wholesale Users

On WooCommerce version 3.4.6, they released a security fix that prevents shop managers to edit other users except for users with customer roles.

This means from this version onwards, shop managers will not be able to edit users with the wholesale user roles generated from our WooCommerce Wholesale Prices and Prices Premium plugin.

To re-enable this, you will need an additional snippet to allow shop managers to edit wholesale users.

Please use this snippet to allow shop managers to edit users with the default wholesale_customer roles. If you have additional wholesale roles, you can include them in roles in the snippet below. Place this snippet on your theme/child theme’s functions.php and this should give shop managers the permission to edit your wholesale roles.

function wws_allow_shop_manager_role_edit_capabilities( $roles ) {
    $roles[] = 'wholesale_customer'; // insert the wholesale role here, copy+paste this line for additional user roles
    return $roles;
}
add_filter( 'woocommerce_shop_manager_editable_roles', 'wws_allow_shop_manager_role_edit_capabilities' );

 

Solve The Big Three Problems With Wholesaling In WooCommerce

Add wholesale pricing to products   Streamline your ordering   Register & manage wholesale customer

Explore The Plugin Suite  

[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']