WooCommerce Add to Cart Button Not Working or Doing Nothing
The button spins, does nothing or shows an error. Check JavaScript errors, caching, theme and settings.
Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Quick checks
- Open the console (F12) and click the button. See our console guide.
- Make sure the product has a price, is in stock and is purchasable.
- For variable products, a variation must be selected.
Causes
- JavaScript conflicts or minify. See our JavaScript guide.
- Cache on cart pages and cookies. See our checkout guide.
- The setting Redirect to the cart page after successful addition and AJAX options in WooCommerce > Settings > Products.
- Theme overrides of WooCommerce templates. Test with a default theme.
- Plugin conflicts. See our conflict guide.
- Blocked requests from a firewall. See our 403 guide.
Related guides
- WordPress Shows the Wrong Time or Publishes at the Wrong Time
- Where to Add Custom CSS or Code in WordPress Without Losing It After Updates
- "The Uploaded File Exceeds the upload_max_filesize" in WordPress: Fix
- WordPress Update or Plugin Install Failed: 'Could Not Create Directory'
Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.