• Resolved thesinglegourmet

    (@thesinglegourmet)


    Hi,

    In this thread: https://www.ads-software.com/support/topic/caching-issue-after-woocommerce-latest-update/ you wrote that the issue of the admin’s cart showing up in the cart of the user that is switched to “is a known issue with WooCommerce. Items in your cart are stored in your browser’s cookies, but they don’t get removed when you switch user.”

    I think the following steps demonstrate that it’s not a cookie problem:

    1. Open two browsers, Chrome & Firefox.
    2. Log in as admin in both.
    3. Check the carts of both. If there are any products, empty the carts. If not, skip to step 7.
    4. Log out of both.
    5. Log in as admin in both.
    6. Check the carts of both.
    – Result: they are empty.
    7. In Firefox, navigate to “Users”.
    8. In Chrome, add product(s) to cart.
    9. In Firefox, do not navigate to cart.
    10. In Firefox, switch to a non-admin user.
    11. In Firefox, navigate to cart.
    – Result: products added in admin account in Chrome are in non-admin user’s cart in Firefox.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Thanks for the detailed report. This is still due to the WooCommerce cookie that stores a reference to your cart contents. The cookie is named woocommerce_cart_hash.

    Thread Starter thesinglegourmet

    (@thesinglegourmet)

    So… Firefox is reading Chrome’s cookie?

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Nope. You have a cookie in each browser which points to the WooCommerce session for the admin user, thus the cart is shared.

    This is really nothing to do with the User Switching plugin. I’m sure if you bring this up with the WooCommerce folks again they can help you out.

    Thread Starter thesinglegourmet

    (@thesinglegourmet)

    Right, each browser has its own cookies, so
    – if there are no items in either Firefox or Chrome cart
    – then you add an item to the cart in Chrome (at which time I assume the website sets the cookie in Chrome, I am not disputing that, but…)
    – that item shows up in Firefox cart

    How did it show up in Firefox? Are you saying that Firefox reads the cookie that Chrome set?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘cache and the cart’ is closed to new replies.