From 45c76cd0cb7f502b7bb61d507e86339dc8ed07fc Mon Sep 17 00:00:00 2001 From: Andrew Benbow Date: Fri, 10 Apr 2015 15:47:28 +0100 Subject: [PATCH 1/2] Update class-wc-gateway-paypal-request.php --- .../paypal/includes/class-wc-gateway-paypal-request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php index 32e1d8e665f..5511041b362 100644 --- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php +++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php @@ -263,7 +263,7 @@ class WC_Gateway_Paypal_Request { } // Check for mismatched totals - if ( ( $calculated_total + $order->get_total_tax() + round( $order->get_total_shipping(), 2 ) - round( $order->get_total_discount(), 2 ) ) != $order->get_total() ) { + if ( number_format( $calculated_total + $order->get_total_tax() + round( $order->get_total_shipping(), 2 ) - round( $order->get_total_discount(), 2 ),'.','',2 ) != number_format( $order->get_total(),'.','',2 ) ) { return false; } From 196448dc0b63dbcc6d79fdb1e881fa982778a8b1 Mon Sep 17 00:00:00 2001 From: Andrew Benbow Date: Sat, 11 Apr 2015 16:14:27 +0100 Subject: [PATCH 2/2] Update class-wc-gateway-paypal-request.php --- .../paypal/includes/class-wc-gateway-paypal-request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php index 5511041b362..48177f43ba2 100644 --- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php +++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php @@ -263,7 +263,7 @@ class WC_Gateway_Paypal_Request { } // Check for mismatched totals - if ( number_format( $calculated_total + $order->get_total_tax() + round( $order->get_total_shipping(), 2 ) - round( $order->get_total_discount(), 2 ),'.','',2 ) != number_format( $order->get_total(),'.','',2 ) ) { + if ( wc_format_decimal( $calculated_total + $order->get_total_tax() + round( $order->get_total_shipping(), 2 ) - round( $order->get_total_discount(), 2 ), 2 ) != wc_format_decimal( $order->get_total(), 2 ) ) { return false; }