PHP
6
Вклад в тег
add_filter( 'woocommerce_variable_sale_price_html', 'wc_wc20_variation_price_format', 10, 2 );
add_filter( 'woocommerce_variable_price_html', 'wc_wc20_variation_price_format', 10, 2 );
function wc_wc20_variation_price_format( $price, $product ) {
$price = wc_price( min( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) ) );
return $price;
}