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

Remove swatches from template

Hello,
I have a small problem.
I use an Elementor and would like to determine the place of the widget myself. For this I have used the shortcode. This also works.
But now the variation selection is displayed in two places, because they are placed somewhere automatically.

How can I remove them?

 

Thank you .

 

Sergio

Hakik Zaman

Hi Sergio,

Thanks for reaching out to us. You can try the below code-
function wvs_remove_default_swatch_support(){
remove_action( 'woocommerce_after_shop_loop_item', 'wvs_pro_archive_variation_template', 7 );
remove_action( 'woocommerce_after_shop_loop_item', 'wvs_pro_archive_variation_template', 31 );
}
add_action('init', 'wvs_remove_default_swatch_support');
You can paste the above code at your child theme’s functions.php or add it as a snippet by installing the Code Snippets plugin.

Thank You