add-circle-bold add-circle add-square add alarm-bell-1 alert-diamond analytics-pie-2 archive archive arrow-down-1 arrow-down-2 arrow-left-1 arrow-right-1 arrow-up-1 attachment-1 bin-paper-1 book-star button-record check-1 check-circle-1 close close-quote close cog-1 cog common-file-stack copy-paste credit-card-1 diagram-fall-down disable time-clock-midnight download-thick-bottom drawer-send envelope-letter envelope-letter expand-6 expand-6 file-code filter-1 floppy-disk flying-insect-honey folder-file-1 headphones-customer-support hierarchy-9 hyperlink-2 information-circle keyboard-arrow-down keyboard-arrow-up layout-module-1 list-bullets lock-2 lock-unlock-1 love-it messages-bubble-square move-to-top multiple-circle multiple-neutral-1 multiple-users-1 navigation-menu-horizontal navigation-menu network-browser open-quote pencil-1 pencil-write pencil-1 print-text rating-star rating-star remove-circle remove-square-1 search send-email-1 shield-warning single-neutral-actions single-neutral smiley-sad-1 smiley-unhappy smiley-indifferent smiley-smile-1_1 smiley-happy smiley-sad-1 smiley-unhappy smiley-indifferent smiley-happy smiley-thrilled social-media-twitter synchronize-arrows-1 tags-double ticket-1 ticket-1 time-clock-circle undo view-1 view-off view wench

How to Fix the “Cart is Empty” Issue

For some reason, sometimes you add products to cart but the cart page stays empty (even if you can clearly see the cart widget has products in it for example).

But don’t worry – it may just be a simple cache issue (and if you don’t know what cache is that’s no problem either) or a theme / plugin “conflict”.

The WooCommerce Cart page is extremely delicate; it displays dynamic content based on cookies and PHP sessions, is coded with PHP but also JS and Ajax, requires to be excluded from cache and is subject to problems in case of out of date software.

So, here’s your “Empty Cart” troubleshooting checklist you can follow without any technical knowledge.

I also recommend you read through the (many) comments, because many developers shared what worked for them too. Good luck!

Fix 0. Update WordPress & WooCommerce

This is not even considered a fix because I give for granted your website is running on latest WordPress and WooCommerce. If that’s not the case, well, there’s no point you keep troubleshooting, because once you report a potential plugin / theme / hosting / whatever bug that you think is breaking the Cart, the support team will ask you to upgrade WP and WC before considering your issue. Just so you know!

Fix 1. Think about what you changed before the error occurred

Maybe you installed a new plugin? Or updated your theme? Or even you customized WooCommerce with a custom developed snippet. Possibly, WordPress autoupdated.

If you keep a changelog of all your WooCommerce website changes and compare that to the date the Empty Cart error started, you can possibly identify quickly what the issue is, without having to follow the next steps.

If that’s the case, simply uninstall the plugin you installed, or “rollback” / downgrade your theme to the previous version, or remove your custom snippet. That’s probably what’s causing your problem.

If not, keep going with your fix attempt.

Fix 2. Temporary disable all plugins except WooCommerce

This is a typical troubleshooting operation. You won’t lose any plugin data or settings and you will be able to bulk activate all previously enabled plugins in a few seconds.

So, bulk disable all plugins and see if the Cart is back functioning.

If the Cart now fills up with products, well, that’s a wonderful news. One of the plugins is responsible for causing the Empty Cart issue.

Now simply reactivate one plugin at a time and test the Cart after each time. As soon as the Cart stops filling and is empty, well, the plugin you just reactivated is the “guilty” one – yay!

Disable that plugin. See if, for some reason, you’ve missed the latest update. If that’s not the case, well, report the bug to the plugin developer (in case it’s not fixed asap, go find an alternative).

Fix 3. Temporarily switch to 2020 theme (or similar)

This is to prove the error is not theme-related. If deactivating plugins did not help, well, a Cart conflict may be created by your current theme.

You won’t lose any theme settings if you temporarily switch to another theme, so don’t worry – you will get all your widgets, menus, customizer settings and options back once you reactivate your current theme.

First of all, if you’re using a child theme, temporarily switch to the parent theme and test the Add to Cart / Cart functionality. This is to exclude issues in your child theme.

If that doesn’t do the trick, switch to 2020 theme, Storefront theme or whatever default WordPress theme you find in the most popular themes tab.

If the error goes away, first check if you missed out on a recent update (mostly premium themes may not show WP Admin notices when an update is available). Then, contact your theme developer and report the bug.

If the error doesn’t go away when switching the theme, then you have some other things to check if you wish to fix the Empty Cart error.

Fix 4. Make sure Theme, WooCommerce & WordPress are using “compatible” versions

When you update a WordPress plugin, you will see a little note inside the upgrade box – “Compatibility with WordPress X.Y.Z: 100% (according to its author)“:

Version Compatibility

There is no point to update WooCommerce (or another plugin), if it hasn’t been tested with the latest WordPress version yet.

The same applies to updating plugins that depend on WooCommerce. There is no point in updating a premium WooCommerce extension if it hasn’t been tested for the WooCommerce plugin version your website is on. In fact, before any major WooCommerce plugin update, you should see this:

Major WooCommerce Plugin Updates

In the example above, there is no point to update WooCommerce, because “WooCommerce Give Products” and “WooCommerce Product Add-ons” plugins have been tested only up to WooCommerce 2.6.0. In this case, you’d need to wait until those two plugins updates are released. Only then you go and update WooCommerce.

You should consider the same exact thinking when updating your WordPress theme. Sometimes theme developers require a few days before they can adapt to the new WooCommerce changes (if major) and become 100% compatible. So, once again, make sure WordPress, WooCommerce, WooCommerce Extensions and Theme versions are in sync.

Fix 5. Make sure there is no “red font alert” under WooCommerce > Status

The most important things to check in the System Status page are making sure all your “WC Pages” are correctly set, that the Cart page contains the correct shortcode and is publicly available, and that your theme has no out of date WooCommerce template overrides.

WooCommerce System Status OK

WooCommerce System Status OK

Fix 6. Try clicking these buttons under WooCommerce > Status > Tools

Mostly the “Clear customer sessions” one can usually help you troubleshoot Cart problems (as well as shipping calculations issues, just so you know).

WooCommerce: fix the cart is empty issue

Clear Customer Session @ WooCommerce Status

Fix 7. Save (flush) your permalinks

Go to WordPress > Settings > Permalinks and click on the “update” button without changing anything. This should flush the permalinks and give you a chance to test the cart again.

Fix 8. Check you have no spaces in your checkout endpoints

Go to WooCommerce > Settings > Advanced > Checkout Endpoints and make sure you have no spaces in your endpoint URLs. This happened to a client of mine a while ago and it took me ages to find out it was causing the empty cart issue.

WooCommerce Checkout Endpoints

WooCommerce Checkout Endpoints

Fix 9. Properly set up your cache (plugin or server-side)

Cart, Checkout and My Account pages should never be cached because they display dynamic content.

If your WordPress cache plugin is for some reason caching these WooCommerce pages, your cart will probably show as empty. Make sure to select a WooCommerce-compatible cache plugin or one that allows you to add “cache exclusion URLs”.

If that doesn’t do the trick, be aware you may also have server-side cache! So, yes, ask your hosting provider to disable or properly set up server-side cache by excluding the Cart. Checkout and My-Account URLs.

Some hosts rely on their own cache systems such as Varnish and this is sometimes applied to your website by default. Create a ticket or give them a quick call to find out if they have anything like that and if they can disable that as soon as possible.

For example: WPEngine uses its own cache. This might affect your WooCommerce Cart. Please contact support so they can create a caching exception list for WooCommerce and/or Ajax files