Ürün fiyatlarını sadece seçenek seçili iken göstermek istiyorsanız aşağıdaki kodu ekleyerek çözüm sağlayabilirsiniz.
function bolcal_custom_variation_price( $price, $product ) {
$target_product_types = array(
'variable'
);
if ( in_array ( $product->product_type, $target_product_types ) ) {
// if variable product return and empty string
return '';
}
// return normal price
return $price;
}
add_filter('woocommerce_get_price_html', 'bolcal_custom_variation_price', 10, 2);