Round order total. Closes #342.

This commit is contained in:
Mike Jolley 2011-12-23 16:30:46 +00:00
parent 2ec1dafa90
commit 50774151a4
1 changed files with 1 additions and 1 deletions

View File

@ -913,7 +913,7 @@ class woocommerce_cart {
*
* Based on discounted product prices, discounted tax, shipping cost + tax, and any discounts to be added after tax (e.g. store credit)
*/
$this->total = $this->cart_contents_total + $this->tax_total + $this->shipping_tax_total + $this->shipping_total - $this->discount_total;
$this->total = number_format( $this->cart_contents_total + $this->tax_total + $this->shipping_tax_total + $this->shipping_total - $this->discount_total, 2, '.', '');
if ($this->total < 0) $this->total = 0;
}