Shop manager cannot edit users

Issue #984 resolved
Valentina R created an issue

I tried giving Shop manager all permissions related to users, then logged in as the Shop Manager and he still cannot edit (only view). I tried changing capabilities with code and with a plugin - it’s the same.

Reported here.

Comments (1)

  1. Valentina R reporter

    Not a bug. It's a WC limitation that can be overridden with this filter:

    add_filter('woocommerce_shop_manager_editable_roles', 'shop_manager_edit_staff', 10, 1);
    
    function shop_manager_edit_staff( $roles ) {
        return array('customer', 'shop_staff', 'subscriber');
    }
    
  2. Log in to comment