Fix a WooCommerce basket that empties, does not refresh or loops, by checking the session, the cookies, the cache, the theme and the fragments. The priority is to restore a situation under control without wiping the traces useful to the diagnosis.

How do I recognise a WooCommerce basket empty or stuck?
The WooCommerce checkout depends on the browser, the cache, the session, the plugins, the calls to the gateway, the webhooks and the scheduled tasks. The diagnosis has to follow an order from end to end without making any irreversible change to the live shop. Start by noting when it appeared, the most recent changes, the URLs concerned and the behaviour observed.
Place a complete order with a customer account and as a guest, on desktop and on mobile. Note the message shown, the step where the journey stops and the exact time: that is what lets you find the event in the logs.
A product added, then an empty basket
Quantities that cannot be changed
A different basket on different pages
One signal alone does not prove the cause: “A product added, then an empty basket” can come from “Page cache or a CDN on the dynamic URLs” just as easily as from “Session cookies blocked, or an inconsistent domain”. Look for at least two findings that agree before you apply a lasting fix.
The basket depends on a session and a cookie
WooCommerce ties the basket to a session identified by a wp_woocommerce_session cookie and stored in the database. If the cookie is never created, is deleted, or the page is served from a cache, the basket appears to empty, or stops updating.
The commonest cause is a page cache that includes the Cart, Checkout and My account pages. Those have to be excluded from the cache, as do requests carrying the woocommerce_items_in_cart and woocommerce_cart_hash cookies. Serious caching plugins offer an automatic WooCommerce exclusion, worth checking after every configuration change.
Other leads: the domain, the scripts and the cleanup tasks
A hop between http and https, or between www and non-www, during the journey creates two different cookies and loses the basket. Check every internal URL and the WordPress configuration all use the same canonical form.
The basket can also stick if a script fails: open the browser console and the Network tab to check the wc-ajax=update_order_review and get_refreshed_fragments requests. Finally, a very large sessions table slows every add-to-basket: WooCommerce clears expired sessions through a scheduled task you need to keep working.
Causes to check
For a WooCommerce basket empty or stuck, the 4 causes below are ranked from the commonest to the rarest. Test the one matching the site’s most recent change first, one at a time.
Page cache or a CDN on the dynamic URLs
Session cookies blocked, or an inconsistent domain
The theme clashing with the cart fragments
A JavaScript error during the AJAX add
The WooCommerce logs (Status > Logs), the scheduled actions, the webhook history and the payment provider's dashboard show whether the request left the shop, whether it was declined, or whether the confirmation never came back.
A good fix does not merely make the symptom disappear. It explains why the problem appeared and how to check that it does not come back.
Precautions before starting
Back the files and the database up, then export the list of orders and payments for the period in question, without copying any card data.
If the shop is still selling, keep the testing short and avoid replacing the database while orders are coming in: a restore would wipe the recent sales.
Which cause best matches your situation?
Pick the situation closest to what you are seeing to get the first recommended action.
Want a human opinion on your exact situation?
Get a recommendationDiagnosis and fix
| Phase | Objective | A mistake to avoid |
|---|---|---|
| Observe | Reproduce it and gather the evidence | Changing several settings before you have a baseline |
| Isolate | Confirm the component or the rule responsible | Deleting files without keeping a copy |
| Fix | Apply the smallest documented change | Restoring a version that still contains the same cause |
| Validate | Test the whole journey and monitor it | Concluding from the home page loading alone |
How do I resolve the problem?
The 4 steps below tackle a WooCommerce basket empty or stuck from the least intrusive to the heaviest. After each change, repeat the same test; if nothing changes, go back to the previous state before moving on to the next step.
- 01
Step 1
Test in a private window and note the cookies and console errors.
- 02
Step 2
Keep the basket, checkout, account and the WooCommerce cookies out of every cache.
- 03
Step 3
Check HTTP/HTTPS and www/non-www all redirect to a single origin.
- 04
Step 4
Test with a stock theme and no JavaScript optimisation.
add several products, then change and remove the quantities.
Validate the resolution
Validate the whole journey: adding to the basket, choosing shipping, payment, the order being created, stock updating, and the emails arriving for both the customer and the shop. Finally, reconcile the orders against the payments taken during the incident.
Validation checks
Watch the pending orders and the webhooks for a few days, above all at the busiest hours.
Prevent a recurrence
Prevention has to answer the cause you identified. For a WooCommerce basket empty or stuck, the first measure is “Document the cache exclusions”; note too the signal that would have shown the incident sooner, and who is responsible for watching for it.
Document the cache exclusions
Test the front-end optimisations
Avoid running two caching systems
Monitor the JavaScript errors
Place a real order after every update to WooCommerce, the theme or a payment gateway, and keep an alert on orders left awaiting payment.
Frequently asked questions about a WooCommerce basket empty or stuck
Why does the basket empty between two pages?
The WooCommerce session rests on a cookie. A badly configured page cache, a hop between http and https or between www and non-www, or a blocked cookie all lose the basket.
Which pages should you keep out of the cache?
The Cart, Checkout and My account pages, along with any request carrying WooCommerce's cart cookies. Most caching plugins offer an automatic exclusion, which is worth checking.
Can the database slow the basket down?
Yes, a very large sessions table or failing scheduled tasks weigh every basket update down. Check that the cleanup of expired sessions is running.
How do you check the fix will hold?
Add several products, then change and remove the quantities. Test as a guest and logged in, on mobile and in several browsers. Check the mini-basket, tax, shipping and the checkout. Then watch the logs, the alerts and the relevant metrics for several days.
How to resolve it
If a WooCommerce basket empty or stuck persists after these steps, we can pick the diagnosis up again from your logs and your access details, without acting blind on the site.
Get a diagnosisSummary with an AI
Choose your assistant: the request is prefilled where that is possible, and always copied, ready to paste if need be.

































🍪