Round order total. Closes #342.
This commit is contained in:
parent
2ec1dafa90
commit
50774151a4
|
@ -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)
|
* 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;
|
if ($this->total < 0) $this->total = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue