fbpx
🤝  NEW YEAR SALE RETURNS - 50% OFF all plans! 🤝 Grab it Now

The boxes are always checkable even when the product is no longer in stock

Laurine Pepin

Hello,

I noticed that when customers go to a product page, the boxes get greyed out when the product is out of stock but only when there is a variation (for example the size). When there are several variations (size and color), the boxes do not get grayed out even though the products are no longer available.

Golam Kibria

Hi Laurine,

Thank you for reaching out to us. Please kindly do a plugin compatibility check by doing these steps to identify the error :

=> Deactivate all of your additional plugins except WooCommerce and WooCommerce Variation Swatches Plugin.

=> See if the problem persists. If the issue is resolved, you can tell which plugin might be the culprit of this error by activating your additional plugins one by one.

If the plugin conflict check doesn’t help, please record me reproducing your issue using a tool like this. https://www.useloom.com
It helps me to figure out the issue quickly and squash it immediately.

And don’t forget to add your site login details in the site login details area. I’ll check what’s happening there.

You can add new users by going to Users > Add New set the user and password for us, set the role to admin, and set the info here.

And add your site URL, login username, and password in the site login area. Follow this guideline: https://www.useloom.com/share/27c1f2ac633c4060b2da883d946107d7

Hope to hear from you soon!

Thank you

Hakik Zaman

Hi Laurine,

Thanks for reaching out to us. Please try the below snippet using the Code Snippets plugin:

add_filter( 'woo_variation_swatches_global_ajax_variation_threshold_max', 'woo_variation_swatches_global_ajax_variation_threshold_max_edit', 10, 2 );
function woo_variation_swatches_global_ajax_variation_threshold_max_edit( $size, $product ){
   return 700;
}

Then let me know if it helps or not.

Thank You

Laurine Pepin

Hello,

 

Where do I put the code snippet ?

I don’t understand

 

Thanks

 

Hakik Zaman

Hi Laurine,

Please install a plugin called Code Snippets.

Then add a PHP snippet by copying the above code.

Thank You