Knowledgebase

Cart is empty or contents lost at checkout Print

  • woocommerce, caching, plugins, https, troubleshooting, cloudflare, cdn, guide
  • 0

The cart clears unexpectedly.

THE USUAL CAUSE

Caching. Cart and checkout pages must never be cached, and a caching plugin serving a cached cart page shows an empty or another visitor's cart.

THE FIX

Exclude cart, checkout and account pages from caching, in the plugin and at the CDN.

Most caching plugins exclude them automatically when they detect the shop. Confirm rather than assume.

AT CLOUDFLARE

A page rule bypassing cache for the cart, checkout and account paths.

SESSION PROBLEMS

Cart contents rely on a session or a cookie. A mismatch between the address the customer is on and the configured site address prevents the cookie being read.

Check the site URL matches, particularly www versus non-www.

MIXED HTTP AND HTTPS

Moving between schemes loses the session. Force HTTPS everywhere.

TESTING

In a private window, as a guest: add to cart, browse other pages, then go to checkout. Confirm the cart persists.

Test on mobile as well.


Was this answer helpful?
Back

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


Trustpilot