fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Variation Swatches for WooCommerce Out of stock red cross missing

I noticed that on some of my products, the Red x that appears on sizes that are out of stock stopped working, and instead a message appears when I select an out of stock product:

https://www.tuxedosonline.com/mens-dress-shirt-french-convertible-cuff.html/?attribute_pa_colors=teal&attribute_pa_size=xl3

This is not consistent site-wide because The x over the sizes does work on products like this:

https://www.tuxedosonline.com/globe-slip-on-shoe-6753.html/

Why is this not consistent across all products and what can I do to get the red x back on the products like the dress shirt?

 

Hakik Zaman

Hi VREJ,

Thanks for reaching out to us. Please try the below code 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;
}

Hope to hear from you soon!

Thank You