I am having a problem with my clients wordpress site not working correctly with Variable Products. The Add to Cart button does not display. I have compared the code with old site (which is showing it correctly) and I see the .single_variation_wrap class is set to display none on the new site, the old site automatically displays it.
I found a forum online that had a solution. It said to add the following code to the functions.php.
wp_enqueue_script('add-to-cart-variation', plugins_url() . '/woocommerce/js/frontend/add-to-cart-variation.js',array('jquery'),'1.0',true);
Which was perfect. It displayed all the correct info (add to cart button, price and quantity counter) added the product to the cart and so on.
Then I reloaded the page and it all went away. Now its back to the way it was before and the code is still in the functions.php, but now nothing is triggering.
I have tried the following:
1. Setting the .single_variation_wrap to display:block. (This will only show the add to cart button and quantity, it will not show the price or add it to the cart as that gives separate error message that says please choose product options.
2. Cleared the cache of both wordpress and my browser
3. Disabled all plugins
4. Switched themes. The problem still happens even with the default wordpress themes.
5. Filling in all of the variable fields like SKU/Price/Dimensions...
I made no changes after I entered the code into the functions.php. It just stopped functioning no matter what browser I use.
This is the link to the new site that I am working on:
This is the link to the old site for the exact same page to use as a reference for what is working correctly.
This is an image of where the button should be
This is an image of the functions.php
Any help would be greatly appreciated.