• Resolved bt_dev

    (@biotrace)


    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.

    • This topic was modified 3 years, 1 month ago by bt_dev.
Viewing 1 replies (of 1 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @biotrace,

    Glad to hear this is resolved! and thanks for letting us know and sharing the PHP snippet.

    I’m going to close this thread now. You can open a new thread if you have further questions.

    Have a nice day!

Viewing 1 replies (of 1 total)
  • The topic ‘Shop Manager User Edit – Code Snippet No Longer Working’ is closed to new replies.