diff --git a/includes/gateways/paypal/class-wc-gateway-paypal.php b/includes/gateways/paypal/class-wc-gateway-paypal.php index b03079c6df5..e60cdc5387d 100644 --- a/includes/gateways/paypal/class-wc-gateway-paypal.php +++ b/includes/gateways/paypal/class-wc-gateway-paypal.php @@ -810,7 +810,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway { } // Validate amount - if ( $order->get_total() != $posted['mc_gross'] ) { + if ( number_format( $order->get_total(), 2, '.', '' ) != number_format( $posted['mc_gross'] 2, '.', '' ) ) { if ( 'yes' == $this->debug ) { $this->log->add( 'paypal', 'Payment error: Amounts do not match (gross ' . $posted['mc_gross'] . ')' ); }