From b487e363ce6b2cfc893f3f6b3f9c959635a74067 Mon Sep 17 00:00:00 2001 From: vedanshujain Date: Fri, 7 May 2021 14:58:52 +0530 Subject: [PATCH] Restore formatting but without rounding for backward compat. --- includes/class-wc-cart.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index cac7a44c107..e5cca710813 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -430,7 +430,7 @@ class WC_Cart extends WC_Legacy_Cart { * @param string $value Value to set. */ public function set_subtotal( $value ) { - $this->totals['subtotal'] = $value; + $this->totals['subtotal'] = wc_format_decimal( $value ); } /** @@ -470,7 +470,7 @@ class WC_Cart extends WC_Legacy_Cart { * @param string $value Value to set. */ public function set_shipping_total( $value ) { - $this->totals['shipping_total'] = $value; + $this->totals['shipping_total'] = wc_format_decimal( $value ); } /** @@ -490,7 +490,7 @@ class WC_Cart extends WC_Legacy_Cart { * @param string $value Value to set. */ public function set_cart_contents_total( $value ) { - $this->totals['cart_contents_total'] = $value; + $this->totals['cart_contents_total'] = wc_format_decimal( $value ); } /** @@ -531,7 +531,7 @@ class WC_Cart extends WC_Legacy_Cart { * @param string $value Value to set. */ public function set_fee_total( $value ) { - $this->totals['fee_total'] = $value; + $this->totals['fee_total'] = wc_format_decimal( $value ); } /**