Hi folks, this question relates to a Wordpress function, but as it’s still php specific i thought it would be better posted here.
Basically i’m drawing in a csv into woocommerce and during upload i am running a custom function on the price field to convert my trade price to retail price.
So on the csv import field i run this
[php][price_mod({trade_price[1]},3)][/php]
which calls this function
[php]function price_mod($price,$number) {
return $price*$number;
}[/php]
In theory it works but i would love someone to help me expand it.
Basically it is giving me results like £12.753 & £16.724 etc etc … So you can see my problem.
What i would like is for it to always round up to the nearest .99
So £12.753 would become £12.99 ---- £16.724 would become £16.99.
I don’t know if this is at all possible, nor am i really a coder.
Any help would be greatly appreciated.