Knowledgebase

Cart Emptying or Not Updating Print

  • woocommerceonlinestores, woocommerce, caching, plugins, performance, php, firewall, themes, troubleshooting
  • 0

Items disappear from the cart, or the cart count is wrong.

THE USUAL CAUSE

Caching. The cart is specific to each visitor and must never be cached. A cached cart page shows one visitor's cart to another, or an empty one to everyone.

WHAT TO CHECK

  1. Confirm Cart, Checkout and My Account are excluded from caching. LiteSpeed Cache does this automatically for WooCommerce; verify rather than assume.
  2. Exclude cart fragment requests from caching, or the header cart count stops updating.
  3. If you use a custom cart page, exclude it manually by URL.
  4. Purge all caches and retest in a private window.

OTHER CAUSES

Session problems, where PHP sessions are not persisting. Check with a default theme and plugins disabled. A plugin conflict, particularly with another caching or optimisation plugin running alongside. Cookies blocked in the browser, which affects only that visitor.

TESTING

Add an item, close the browser, return, and confirm the cart persists. Then open the site in a private window and confirm you see an empty cart, not the previous one.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot