Show negative value in fee - compatible while having Currency switcher by villatheme
Show negative value in fee - compatible while having Currency switcher by villatheme
add_filter( 'wc_price', function ($return, $price, $args, $unformatted_price){
if($unformatted_price < 0){
$return = str_replace('<span class="woocommerce-Price-amount amount">', '<span class="woocommerce-Price-amount amount">-', $return);
}
return $return;
}, 11, 4 );