• Resolved petebm

    (@petebm)


    Hi
    I’m not sure if this is a Woocommerce problem, but it’s been suggested this is the right place to ask!

    All of a sudden, users with the Woocommerce role ‘Shop Manager’ get the error message ‘Sorry, you are not allowed to edit this user.’ when they try to change a user’s role from member to customer. The address bar shows ‘https://xxxxx.co.uk/wp-admin/users.php?s=&_wpnonce=1b2fc7d7c0&_wp_http_referer=%2Fwp-admin%2Fusers.php&action=-1&new_role=customer&changeit=Change&um_bulk_action%5B%5D=0&paged=1&users%5B%5D=40&action2=-1&new_role2=&um_bulk_action%5B%5D=0’ which I’m sorry to say does not help me track down any possible reason for the error. I’m using Capability Manager and Ultimate Member, but their settings a) look to be OK & b) haven’t changed.

    Does anyone have any idea why this might have started, or what’s generating that error?

    Thanks
    Pete

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Claudiu Lodromanean

    (@claudiulodro)

    Hi Pete,

    This is due to the WC 3.4.6 security release which created a whitelist of roles shop managers are allowed to edit. Most likely your membership plugin has not updated to add the role to the whitelist yet. You can read more about this at https://woocommerce.wordpress.com/2018/10/11/woocommerce-3-4-6-security-fix-release-notes/

    Easiest fix for your situation is to add the code snippet at the bottom of that linked post to your functions.php (or wherever you add code snippets) and change the part where it says “$roles[] = ‘editor’;” to “$roles[] = ‘member'” (or whatever the slug is for the member role the membership plugin adds). Hope this clears things up.

    Thanks.

    Shane Eckert

    (@shaneeckert)

    Automattic Happiness Engineer

    Hi!

    Late to the game! See answer above.

    • This reply was modified 6 years, 1 month ago by Shane Eckert.
    Thread Starter petebm

    (@petebm)

    And even later to the game, my thanks.

    Apologies for the delay – I had trouble tracking down the appropriate slug (I’m not very good at this, as you may have gathered). For the benefit of any other Ultimate Member users with the same issue, it’s um_member.

    So, it now works perfectly, with the snippet added – my thanks to you again.

    Pete

    Shane Eckert

    (@shaneeckert)

    Automattic Happiness Engineer

    Hi!

    Really glad to hear that the snippet got you back up and running.

    Have a great week!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shop Manager suddenly unable to change user role’ is closed to new replies.