Skip to content
✉ support@devtechi.com● Available for remote projects worldwide
Web · Software · Ecommerce · SEO · Support

WooCommerce Add to Cart Button Not Working? Causes and Solutions

Fix WooCommerce Add to Cart issues with a step-by-step guide to product settings, variations, AJAX errors, caching, theme conflicts and cart sessions.

A customer finds the product they want, clicks Add to cart, and nothing happens. Sometimes the button spins forever, the cart count stays at zero, or the product appears briefly and disappears. For a WooCommerce store, those failures can interrupt purchases even when the rest of the website looks normal.

The solution depends on where the failure happens: a single product, a variable product, a shop archive, or every Add to Cart button. This tutorial shows how to test the problem safely and narrow down the cause without making risky changes to a live store.

Start by reproducing the issue like a customer

  1. Open the store in a private/incognito browser window while logged out of WordPress.
  2. Test one simple in-stock product and one variable product.
  3. Click Add to Cart from the shop page, then from the single product page.
  4. Open the Cart page and refresh it to see whether the item remains.
  5. Repeat on a phone or second browser and record any error message.

A bug affecting only logged-out customers often points toward caching, sessions or security rules. A bug affecting only one product is more likely to involve that product’s settings or customizations.

Illustration of a WooCommerce checkout with warning and success icons
The cart and checkout are connected: diagnose the Add to Cart failure before looking for payment problems.

1. Check product status, price and inventory

Open Products → All Products and edit the affected item. Confirm that the product is published, purchasable and not unintentionally out of stock. Check its regular or sale price where applicable, stock-management rules, purchase limits, and any catalog-visibility setting. A custom theme may hide or disable buttons when a product is unavailable.

2. Select all required variations

For variable products, make sure the customer has selected a valid combination such as size and colour. In the editor, confirm that each intended variation exists, is enabled and has the required price and stock data. A missing or unavailable variation can make Add to Cart appear broken when the store is correctly preventing an invalid purchase.

3. Fix cart and session caching

WooCommerce needs dynamic cart information that belongs to each shopper. Exclude Cart, Checkout and My Account from full-page caching in your cache plugin, hosting platform and CDN. Make sure customer session cookies and WooCommerce’s dynamic AJAX or Store API requests are not incorrectly cached. Then purge caches and retry in a fresh private session. A static version of the cart can show the wrong item count or an empty cart.

4. Check for JavaScript errors

In Chrome or Edge, press F12 or Ctrl+Shift+I, open the Console, click Add to Cart and look for the first relevant red error. JavaScript conflicts from a theme, optimisation plugin or third-party widget can stop button interactions. Keep the error text and script filename for debugging, but never publish customer data or secret tokens.

Photograph illustrating online shopping and ecommerce
Test the buying journey from a shopper’s perspective, not only from the WordPress administrator dashboard.

5. Inspect failed AJAX or Store API requests

Open developer tools’ Network tab, click the button again, and identify the request created by the action. Depending on your theme, WooCommerce version and page type, cart actions may involve WooCommerce AJAX endpoints or the Store API. A 403 may indicate a firewall/security restriction, 404 an incorrect path, and 500 a server-side error. Check the actual response before deciding which system is at fault.

6. Test a plugin or theme conflict on staging

After taking a restorable backup, make a staging copy of the store. Temporarily switch to a compatible default WooCommerce theme and disable nonessential plugins to compare behaviour. Reactivate one plugin at a time until the issue returns. Avoid experimenting with payment gateways, memberships or live orders on the public store during business hours.

7. Check cart pages and WooCommerce settings

Visit WooCommerce → Settings → Advanced and make sure the required cart and checkout pages are configured correctly. Verify that the Cart page contains the appropriate WooCommerce Cart block or the supported legacy shortcode used by your site. If a page was accidentally deleted or replaced, the product may be added but the customer journey can break afterward.

8. Review custom Add to Cart buttons and product URLs

Custom buttons, quick-view popups and page-builder product widgets may use incorrect product IDs or fail to pass selected variations. Compare the problem with WooCommerce’s normal single-product button. If the core button works and a custom button fails, inspect the custom implementation instead of changing unrelated server settings.

9. Check recent updates and server logs

If the issue started after updating WooCommerce, a theme, PHP or an extension, record the version changes and review compatibility notices. Check WooCommerce system status, any relevant logs under its Status area, and server PHP logs. A fatal error or extension compatibility conflict can prevent a cart request from completing.

10. Test the complete purchase path after the fix

After a suspected repair, add simple and variable products to the cart, update quantities, remove an item and proceed to checkout. Verify the cart persists through page refreshes and redirects. Where possible, complete a safe test order using the payment gateway’s sandbox mode, not a real customer’s payment details.

Quick diagnosis by symptom

  • Only variable products fail: check variation selection and availability.
  • Button spins forever: inspect JavaScript and failed AJAX or Store API requests.
  • Cart empties after refresh: inspect session handling, cookies and caches.
  • Only one page builder button fails: compare it with the standard WooCommerce product button.
  • Only guest customers are affected: investigate caching and security policies.
  • Orders fail after cart works: move on to our WooCommerce checkout troubleshooting guide.

Frequently asked questions

Should I disable all caching to make Add to Cart work?

Not permanently. Proper WooCommerce caching should keep public product pages fast while excluding customer-specific cart, checkout and account responses. Correct the exclusions rather than sacrificing all performance.

Why does Add to Cart work for me but not customers?

Administrators are often excluded from caches and security checks that affect guests. Test in a logged-out private window and compare request responses.

Can I fix this without deleting WooCommerce products?

Usually yes. Most diagnoses focus on settings, scripts, session handling, template compatibility or plugin conflicts. Deleting products is rarely a sensible troubleshooting step.

Protect sales by fixing the underlying problem

If customers cannot add products to their carts, prioritise a verified repair over visual redesign. DevTechi’s WordPress Emergency Fix service can help investigate a WooCommerce malfunction; provide the affected product URL, steps to reproduce and the latest relevant error.

Sources: WooCommerce caching best practices, WooCommerce AJAX troubleshooting and WooCommerce JavaScript troubleshooting.

Share with