Shop Manager User Edit – Code Snippet No Longer Working
-
Hello – We recently updated Woocommerce to the latest version and our code snippet (below) no longer works to allow Shop Mangers to access the User menu. The user menu no longer displays for Shop Managers. Are you able to advise if there is an updated snippet?
/** * Allow Shop Managers to edit and promote users with a specified 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[] = 'placeholder_role1'; $roles[] = 'placeholder_role2'; $roles[] = 'placeholder_role3'; return $roles; } add_filter( 'woocommerce_shop_manager_editable_roles', 'myextension_shop_manager_role_edit_capabilities' );
EDIT: This issue is resolved. The code snippet still works. The issue was due to a User Roles priority issue within the Ultimate Member plugin.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Shop Manager User Edit – Code Snippet No Longer Working’ is closed to new replies.