variable product round up two decimal places
Round up variable product prices to two decimal places.
add_filter('advanced_woo_discount_rules_format_sale_price_range', function( $html, $min_price, $max_price){
$min_price = number_format((float)$min_price, 2);
$max_price = number_format((float)$max_price, 2);
if (function_exists('wc_format_price_range')) {
$html = wc_format_price_range($min_price, $max_price);
} else{
if(class_exists('\Wdr\App\Helpers\Woocommerce')){
$html = \Wdr\App\Helpers\Woocommerce::formatPrice($min_price) . ' - ' . \Wdr\App\Helpers\Woocommerce::formatPrice($max_price);
}
}
return $html;
}, 10, 3);