After WC update, Shop Managers can only edit users with the Customer role
-
After WC update, Shop Managers can only edit users with the Customer role by default.
We’ve designed it to be easy for extensions that register custom roles to add roles to the whitelist if they want Shop Managers to be able to edit those users. There is a straightforward filter. Here is an example of how to add new roles to the Shop Manager user edit whitelist:/**
* 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’ );Do you think it is possible to add custom roles to whitelist?
Thanks
- The topic ‘After WC update, Shop Managers can only edit users with the Customer role’ is closed to new replies.