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

It doesn’t work like always

Yoandri Perez

On the product page, I am getting the image and price of each attribute even without checking any of them, normally I only had the name of the attribute when the customer checked the one they wanted to see came out at the bottom the price and had no images, I even put the radio selection on each product on my website can help me with this here is the link so you can see it better thank you very much

https://newperezfurniture.com/product/palermo-bedroom-set/

Hakik Zaman

Hi Yoandri,

Thanks for reaching out to us. Can you please place the below code inside your child theme’s fucntions.php or use it as a snippet using the Code Snippets plugin-

add_filter('woo_variation_swatches_global_item_radio_label_template', 'overrid_radio_display_parameter', 10, 2);
add_filter('woo_variation_swatches_variable_item_radio_label_template', 'overrid_radio_display_parameter', 10, 2);
function overrid_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;
}

Please let me know if it resolves your issue or not.

Thank You