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

How to turn off for some products

Hi, how can I turn of the image swatches for certain products?

Hakik Zaman

Hi Thorunn,

Thanks for reaching out to us. Unfortunately, this feature is not currently available.

BTW, you can check out this screencast. But you have to write some custom code.

Here is the snippet-
add_filter( 'default_wvs_variation_attribute_options_html', function ( $default ) {
if ( is_product() ) {
// Add the product IDs inside target array. For example 59,13. Note: add a comma after each product ID
$target = [59,13];

if(in_array( get_the_ID(), $target) ){
return true;
}
return $default;
}
} );

Thank You