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

Thierry Namata

Hello,
I’d like to deactivate this module for a product category rather than a product type. Is this possible and if so, how? Thank you in advance,
Johanna

Hakik Zaman

Hi Thierry,

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

You can send this feature request here: https://storepress.fider.io/

You can also try the following snippet using a plugin called Code Snippets:

add_filter( 'disable_woo_variation_gallery', function( $default ){
global $product;
if ( function_exists( 'is_product' ) && is_product() ) {
$terms_post = get_the_terms( $product->get_id() , 'product_cat' );
$target_cat_ids = [18]; //Insert the category id’s inside the target. For Example: [14,45]
if( in_array( $terms_post[0]->term_id, $target_cat_ids ) ){
return true;
}
return $default;
}
}, 20, 1);

Note: Please carefully follow the above snippet code comments.

Thank You