Solved: Add To Cart Missing for Variable Products in WooCommerce

After updating a theme (I was using The Retailer) and WordPress (to 4.1) I was missing the add-to-cart button in WordPress / WooCommerce webstore for variable products (products with variations).

First, what I tried to get the add-to-cart button back to working:

– change the template (to see if it’s the template’s fault)

– turn all plugins off and on again to see if any plugins are conflicting

– see in the CSS – the button area has a display: none set to it, when changing CSS to visible, add to cart button appears but after adding to cart got a “Please choose product options

– create a new simple product – the add to cart button was present!

– see the debugger in Firefox returning a error 404 to jquery.cookie.min.js

error 404 cookie

 

Here is how I solved the missing add-to-cart button problem

1. Download and install a plugin called WooCommerce jQuery Cookie Fix

from this WooThemes Docs article https://docs.woocommerce.com/document/variable-product/#section-10

Or from here directly: woocommerce-jquery-cookie-fix.zip 

 

It seems that you are a good person and updated all your software, but the server-side configuration that you probably cannot touch needs to be updated too. This plugin will solve your add-to-cart button easily.

 

Spent 2 hours figuring this out. Hope this helps!

Post Author: Tom Pai