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

Swatches Aren’t Hiding in some products

Carlos Díaz

For not available attributes within variations the hide function isn’t working for the products with many variations (yes, I do have the Pro version).

Working:  https://innaluna.com.mx/producto/citric-family/

NOT working:  https://innaluna.com.mx/producto/flower-family/

 

Please help me

Golam Kibria

Hi Carlos,

Please add the following snippet to your child theme’s functions.php file:

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;
}

You can also use the Code Snippets plugin to add it if you don’t have the child theme in place.

Let me know if the problem is resolved.

Thank You