I need help to correct the PHP function. For explanation: I have a price 1.45 and I need to add 10% to this price, but with no roundings. It should show up in woocommerce: 1,595
Hope I explain right 🙂
<?php
function calc_price_net ( $price = null ) {
$price = round ( ( $price * 1.1 ), 0 );
return $price;
}
?>
Instead of round what should be?
thanks a lot for help.
Lucy
2
Answers
thank you very much for answers. But I am totally beginner. If you can please write to whole code. Because non of these worked. But maybe because I did not write them correctly. Please help.