fbpx
Want To Add Extra Images Per Product Variation? Download This Free Plugin

nij Vyas

I have products with variations and simply want the variations displayed as a list rather than attached to a thumbnail. Currently, some variations are associated with the placeholder which is the same as the featured product image. I wish to disable this as the variations I provide are a service and not a physical product. I also have the Variation Swatches for Woocommerce plugin and not sure if I require it. I have tried deactivating both but no success. I have also cleared the cache.

Hakik Zaman

Hi nij,

Thanks for reaching out to us.

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

add_filter('woo_variation_swatches_global_item_radio_label_template', 'override_radio_display_parameter', 10, 2);
add_filter('woo_variation_swatches_variable_item_radio_label_template', 'override_radio_display_parameter', 10, 2);
function override_radio_display_parameter($template, $data){
$new_label_template = apply_filters( 'woo_variation_swatches_global_item_radio_label_template_new', '%variation%', $data );
return $new_label_template;
}

You can also add the snippet using the theme’s functions.php file.

Note: It is recommended to add the Custom Code to the child theme’s functions.php file, to avoid any data loss while updating the Parent Theme.

Hope to hear from you soon.

Thank You

nij Vyas

Thank you very much, Ill give it a go.