WooCommerce - excelling eCommerce
[resolved] Prevent customers from accessing WordPress admin - probl (4 posts)

  1. Ovidiu
    Posted 3 years ago #

    The feature called: "Prevent customers from accessing WordPress admin " prevents anyone, even admins, from editing posts via the front-end, i.e. if I click the "edit post" link in the WP admin bar I end up on my account page just like everyone else. But I am an admin :-(
    So why not check if a user has edit-post capabilities before redirecting him?


  2. Mike Jolley
    Plugin Author

    Posted 3 years ago #

    It does that already:

    if ( get_option('woocommerce_lock_down_admin') == 'yes' && ! is_ajax() && ! current_user_can('edit_posts') ) {

  3. Bozz
    Posted 2 years ago #

    Is this possibly a cookie issue?

    If you load up your shopping cart without logging in, or perhaps you had checked out an order in the past and are re-visiting, and then try to go to yoursite.com/admin, it sends you to the /my-account page.

    When I turn off 'Prevent customers..', it sends me to the wordpress dashboard for user account 'account_username' -- I'm not sure if this was automatically created when I tested the cart before, but that's what my main browser (Firefox) retains. If I switch browsers, no issue.

    It would be useful to have a setting like "Shopping cart expires after X hours". Thanks!

  4. Ovidiu
    Posted 2 years ago #

    I don't think tis a cookie issue. ANY user role is denied access to the back end except admins and shop managers (a role apparently created by woocommerce) BUT I have my own user roles I want to allow access to the dashboard :-(

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.