• Resolved vaakash

    (@vaakash)


    Hi,

    I’m unable to access woocommerce admin page though I’m the administrator of the site with error “Sorry, you are not allowed to access this page.”

    Please note that I’m the administrator of the site. I’ve also tried creating new admin user but the result is still the same.

    Error message:
    https://i.snag.gy/WKkQPe.jpg

    Woocommerce DB not update message shown:
    https://i.snag.gy/a3em25.jpg

    I’m not sure what to check and how to proceed further.

    Can someone please help ?

    Thanks,
    Aakash

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there,

    Thanks for including those screenshots!

    I’m not sure what’s going on here, beyond possibly a plugin that has changed around the user role/permission files.

    What happens if you create a new WordPress user, set it as administrator, and then try to access the WooCommerce admin page?

    You also mentioned the database – what happens when you try to start the database upgrade?

    Thread Starter vaakash

    (@vaakash)

    Thanks for the reply.

    1) When I try to run DB upgrade, it fails with “Sorry you are not allowed to access this page”

    2) I tried creating a new administrator user. But the result is still the same.

    Is there anything else I can check ?

    Thanks,
    Aakash

    Thread Starter vaakash

    (@vaakash)

    Just noticed that my localhost site is also having the same problem coincidentally.

    https://i.snag.gy/FDwSfL.jpg

    Not sure what is the issue.

    Any idea would be helpful.

    Thanks,
    Aakash

    Thread Starter vaakash

    (@vaakash)

    I finally found out the issue.

    Not sure how it is related, but my theme was adding a setting page like below.

    add_theme_page( "AW Options", "AW Theme Settings", 'edit_theme_options', basename(__FILE__), 'aw_admin' );

    Here basename(__FILE__) was causing issue. In my case, it was admin.php
    After changing this to a constant string, the issue is gone.

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Oh, wow, that’s unexpected and unusual. Thank you for sharing the solution!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Admin user cannot access WooCommerce admin page’ is closed to new replies.