Prefer email? hello@boltpress.co

Free with any plan

WooCommerce add to cart not working

When add to cart fails, the product either never reaches the cart or the store forgets the cart on the next page. The usual causes are a cache serving stale pages, a lost session cookie, a theme template or script conflict, or a product that cannot be bought. We find which, fix it and test.

  • Quick Fix $149
  • If we can't fix it, you don't pay
  • WooCommerce

Sound familiar?

  • Customers click Add to cart and nothing happens, or the button spins and never finishes
  • The cart page says it is empty right after a product was added
  • The cart icon shows the item for a moment, then drops back to zero
  • Items vanish from the cart when the customer moves to another page or logs in
  • Variable products refuse to add even when every option is chosen
  • It works for you in wp-admin but not for logged-out customers

Error messages you might see:

  • Your cart is currently empty.
  • Please select some product options before adding this product to your cart.
  • Sorry, this product is unavailable. Please choose a different combination.
  • Sorry, this product cannot be purchased.

Why does this happen?

Add to cart is two jobs: sending the product to WooCommerce, and remembering the cart on every page after that. When either job fails, customers see a button that does nothing, or a cart that empties itself. The fault is almost always in caching, the session cookie, the theme, a plugin script or the product’s own setup.

The causes we find most often:

  • Caching the cart. A page cache, a host cache or a CDN stores one copy of a page and serves it to everyone. If the cart, checkout or account pages get cached, or the cache ignores WooCommerce’s cart cookies, customers see an old, empty cart. This is the classic “it works when I am logged in” fault.
  • A lost session cookie. WooCommerce links each cart to a cookie. If the site address switches between www and non-www, or between http and https, the browser keeps the cookie for one address and the cart looks empty on the other.
  • A blocked request. Add to cart sends a small background request, and on block themes that request goes to WooCommerce’s Store API under /wp-json/wc/store/. A security plugin that restricts the REST API for logged-out visitors, or a firewall or bot rule at the host or CDN, can block it. The button then spins or does nothing for customers but still works for you.
  • Theme template overrides. Many themes ship their own copies of WooCommerce’s cart and add to cart templates. After a WooCommerce update those copies go out of date and can break the button, the mini cart or the variation form.
  • A JavaScript error. One broken script on the page, often from a plugin or a page builder, can stop every script after it, including the one behind the button.
  • The product itself. A product or variation with no price, no stock or a missing option cannot be bought, and WooCommerce refuses it, sometimes with a message that is easy to miss.

Try this first

These checks are safe on a live store. None of them change how the store works for customers.

  1. Add one simple product and one variable product. Do it in a private window while logged out, then open the cart page. Note exactly what happens: nothing, a spinner, an empty cart page, or an item that disappears on the next page. Try your phone too. That one note narrows the cause a lot.
  2. Check the product. In wp-admin, open a failing product. Make sure it has a price and is in stock. For a variable product, open the Variations tab and check that the combination you chose has its own price and stock status. “Sorry, this product cannot be purchased.” usually means a missing price.
  3. Clear your caches. Use your caching plugin’s purge button, and your host’s or CDN’s purge option if you have one, then test again in a fresh private window. If it works for a while and then breaks, caching is the prime suspect.
  4. Look at the status report. Go to WooCommerce, Status. On the System status tab, scroll to the Templates section: lines that say a template “is out of date” point at the theme. On the Logs tab, open the newest log that starts with fatal-errors, if there is one.

Stop and hand it over if the fault started after an update, if the templates are out of date, or if a firewall or CDN is involved. Avoid deactivating plugins one by one on a live store, and avoid the Clear customer sessions tool: both can cost you sales while you test.

Why does the cart icon show the item and then reset to zero?

The header cart count and the mini cart are refreshed by a separate script that asks WooCommerce what is in the cart. If that answer comes back from a cache, or the script never runs, the count shows the old empty value. Newer WooCommerce versions only load that refresh script where a mini cart needs it, so themes that relied on the older behaviour can show a count that never updates. The cart page itself may still be correct.

Where does this end and checkout begin?

This fix covers everything up to a filled cart. If products reach the cart but the order fails at payment or when the customer places it, see the checkout fix. If the button broke the moment you updated a plugin, theme or WooCommerce, see site broken after an update. If add to cart works but takes ages, the cause is usually speed, not a fault: see the slow store fix.

Not sure which one you have? Browse every fix on the Fix WordPress page.

What's included

Included

  • Reproducing the fault as a logged-out customer on desktop and mobile
  • Checking the add to cart requests in the browser for blocked, cached or failing responses
  • Fixing cache, CDN or firewall rules that strip the cart cookie or cache the cart
  • Finding the theme override, script or plugin that breaks the button
  • Checking the product, variation, price and stock setup on the affected products
  • Testing add to cart, the mini cart and the cart page end to end, with a test order
  • A short written report of the cause and what we changed

Not included

  • Building a custom add to cart flow, quick view or side cart
  • Rewriting a theme whose WooCommerce templates are years out of date
  • Bulk editing a large catalog of broken variations

When it becomes a Comprehensive Fix job: If several causes stack up, for example an outdated theme, a page builder and a server cache all touching the cart, or the fault only appears for some customers some of the time, it needs the deeper diagnosis of a Comprehensive Fix. We tell you before any extra work starts.

How it works

  1. Secure access

  2. Full backup

  3. Diagnose (on staging for stores)

    We read the error logs and PHP warnings first.

  4. Fix

  5. Verify (a test order on WooCommerce)

  6. Report

    A written handover: what broke, what we did and what to watch.

Two ways to get it fixed

Pay once for this fix, or get it free when you join a care plan.

Free with any plan
  • Essential $89 per month · 1 work hour
  • Managed Priority support $249 per month · 3 work hours
  • Complete Priority support $399 per month · 5 work hours

Includes 1 free fix, then monthly work hours.

Care plans open soon

Quick Fix
$149

Single-issue resolution: fatal errors, plugin/theme conflicts, update failures, PHP version upgrades.

Fix it for $149 : Add to cart broken

If we can't fix it, you don't pay.

Bigger than one cause? Comprehensive Fix $349: Add to cart broken

Prices in USD.

Refunds are handled by email: support@boltpress.co

What we need from you

  • A WordPress administrator login, or a temporary one we can use
  • Hosting control panel or SFTP access, and your CDN or firewall login if you use one
  • Links to one or two products that fail, and the browser and device you tested on
  • What changed before it started, such as an update, a new theme or a caching change

Frequently asked questions

Why does my cart say it is empty right after I add something?

The product was added, but the next page did not know about it. WooCommerce ties each cart to a session cookie. If a cache serves a stored copy of the cart page, or the cookie is dropped because the site jumps between www and non-www or http and https, the cart page looks empty.

Why does add to cart work on the product page but not on the shop page?

The shop and category pages use a different button. If "Enable AJAX add to cart buttons on archives" is ticked under WooCommerce, Settings, Products, it adds the product in the background without reloading. A script error, a firewall rule or a theme that rebuilt the product grid can break that request while the product page still works.

Will clearing customer sessions fix it?

It can hide the symptom for a while, but WooCommerce's Clear customer sessions tool empties every shopper's cart at once, including people about to check out. It does not touch orders, but on a busy store it costs sales. We only use it when we know the sessions are the problem.

Why do variable products say to select options when I already did?

That message comes from the variation form. If the options were chosen but WooCommerce still complains, the selected combination often has no price or stock, or a theme or swatch plugin changed the form so the choice never reaches WooCommerce. Checking one variation's settings usually tells us which.

Could an update have broken add to cart?

Yes. A WooCommerce update can leave your theme's copies of its cart templates out of date, and a plugin update can add a script error that stops the button. WooCommerce lists outdated theme templates on its System status screen, which is one of the first places we look.

Is this the same as checkout not working?

No. Here the problem happens before checkout: products never reach the cart or fall out of it. If the cart fills correctly but the order fails when the customer pays or places it, that is a checkout or payment fault, and we have separate fixes for those.

Stop fighting your website.
Let us fix it.

If we can't fix it, you don't pay.