Support » Plugin: User Switching » Alternate customer user role not switchable

  • Resolved sassymonkey

    (@sassymonkey)


    With a “Shop Manager” editor-like capability role, I can’t switch to a “Give Donor” role (Give Donation plugin users get this role when they donate) but switch works to Woocommerce “Customer” role users.

    Is there a way I can allow switching to my Give Donor users too just like to my Customer users?

    WHAT I’VE TRIED

    I have a Role Editor plugin and my Shop Manager role has edit_users and list_users capability (there is nothing listed in the capabilities menu for switch_users or anything other than switch_themes).

    The Customer and Give Donor roles have identical capabilities so I would think they’d act the same.

    I’m using latest Woocommerce v5.6.0, WordPress 5.8.1, and User Switching 1.5.7.

    I notice that when I login to the Give Manager user (and after enabling its edit_users/list_users in the Role Editor), I can then switch to Give Donor users AND Woocommerce Customer users. But, after granting the Shop Manager user Give Manager role capability (in Users > Additional Capabilities > Other Roles > Give Manager), I still can’t switch to Give Donor users.

    Note that full admin role users can switch to any user no problem. It’s only when using this editor-like Shop Manager role where I can’t switch to Give Donor users (but that’s essential because I don’t want staff to have full admin control).

    • This topic was modified 9 months, 3 weeks ago by .
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    If the role has the edit_users and list_users capabilities then that should be enough for them to switch to other users.

    When you’re logged in as a shop manager, can you edit the donor users? If not, that might be where your problem lies. The underlying code in User Switching requires that a user needs to be able to edit the user they’re trying to switch to.

    Thread Starter sassymonkey

    (@sassymonkey)

    John,

    Thanks for responding!

    My shopmanager role definitely has edit/list_users activated according to the Role Editor plugin and shopmanager’s own user profile page which shows Additional Capabilities > edit_users.

    I cannot view donor users profile details page as shopmanager user. I can list them but all donor users show the name NOT linked (and the “View” link that appears under the name on hover only leads to a “No results found” error page).

    Any other ideas on how I can force editing capability on users? Is there another route to giving user edit access to my shpomanager role?

    I feel like there’s a clue somewhere in this situation with the give manager user. It can edit donor and customers users. Yet, when I combine shopmanager with give manager capabilities, shopmanager still can’t edit donor users. This seems to point to some fundamental break but I can’t figure out where.

    Thread Starter sassymonkey

    (@sassymonkey)

    I found a workaround: grant donor users the customer role capability. Now I can now edit and switch to these donor users from the shopmanager.

    Settings here: WP Admin > Users > [user profile] > Additional Capabilities > Other Roles.

    Unfortunately, this solution is dependent on the User Role Editor plugin that provides this capability.

    Also, it’s not a future-proof solution because it requires remembering to manually activate on all forthcoming Donor users as well as tying me to yet another plugin I don’t want to keep unless I absolutely must.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Alternate customer user role not switchable’ is closed to new replies.