• Resolved drorbek

    (@drorbek)


    Hi, I just noticed that when I add products to the cart when I’m not logged into the site, they are being removed once I login to my account. If I had products in cart on my logged in account, they will be shown instead of the products I added to the cart when I wasn’t logged into my account.

    If I didn’t have any products in the cart in my account, once I log in it simply removes the items I added to the cart and I get a session expired notice with a go back to shop link.

    Is this the “normal” WooCommerce behavior?

    I want the items I added to the cart to remain in the cart once I login.

    How should I go about fixing this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @drorbek ,

    Is this the “normal” WooCommerce behavior?

    Not really.

    WooCommerce can remember the cart items that have been added before log in and will keep them in the cart after login as well (up to a certain time – 2 days).

    Now, the problem you are facing can happen for multiple reasons. First, you have to make sure that your WooCommerce pages are not cached. The detailed guideline to configure the cache for WooCommerce is here.

    You need to also ask your hosting provider to stop server-side cache for WooCommerce pages as well.

    I will also recommend testing after following these steps –

    1. Deactivate all plugins and activate one by one to find out the faulty one
    2. Switch to a different theme, recommended is the default ones i.e. Twenty Twenty

    Let me know the update and if you have more questions about this.

    Thank you ??

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cart empties once I login to account’ is closed to new replies.