Im trying to display the product variation price inside the variations dropdown.
Im trying to change default behavior where price is displayed inside a div when you choose a variation on the dropdown.
The problem is i cant find where that div is getting the variation price. I searched all javascript but couldnt find it
If i use :
add_filter('woocommerce_variation_option_name' ,'add_price_to_dropdown');
function add_price_to_dropdown($name){
global $product;
return $name.' '.$product->get_price_html();
}
I just get min variation price for all options. I want to get the price for each variation. Any clue?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…