• Resolved bt_dev

    (@biotrace)


    Hello, since upgrading from Woocommerce 3.4.4 to 3.5.1, the Shop Manager is unable to edit or delete users with certain roles. Administrator can still complete these tasks without issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    Shop Managers would not typically be able to manage users at all, so this is likely a permission that was added by another plugin (not coming from WooCommerce).

    Shop Managers can manage the WooCommerce specific functionality, and then the WordPress Editor role permissions.

    Hopefully that helps! Have a great one!

    Thread Starter bt_dev

    (@biotrace)

    Hi Andrew, so only the Administrator role is meant to manage users? That seems odd.

    With all plugins disabled aside from Woocommerce, the Shop Manager role can edit / delete users with the “Customer” role, but no other custom roles.

    Again, this behavior has only changed since we updated from Woocommerce 3.4.4 to 3.5.1.

    We have several Shop Managers that need to be able to edit / delete users. Giving them Admin permissions gives them too much access to the rest of the website settings.

    EDIT: Using the User Role Editor plugin, we tried to give the Shop Manager additional permissions, but even with those permissions added, they were still unable to manage users.

    • This reply was modified 6 years, 4 months ago by bt_dev. Reason: Added info
    Thread Starter bt_dev

    (@biotrace)

    Ok, I found a solution. Apparently this is due to a security update in version 3.4.6

    If you need to allow Shop Manager to edit other user roles here is the official filter:

    https://woocommerce.wordpress.com/2018/10/11/woocommerce-3-4-6-security-fix-release-notes/

    /**
     * Allow Shop Managers to edit and promote users with the Editor role 
     * using the 'woocommerce_shop_manager_editable_roles' filter.
     *
     * @param array $roles Array of role slugs for users Shop Managers can edit.
     * @return array
     */
    function myextension_shop_manager_role_edit_capabilities( $roles ) {
        $roles[] = 'editor';
        return $roles;
    }
    add_filter( 'woocommerce_shop_manager_editable_roles', 'myextension_shop_manager_role_edit_capabilities' ); 
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shop Manager unable to edit / delete users with certain roles’ is closed to new replies.