Merge pull request #20574 from woocommerce/fix/20551
Fix: set order status to refunded when a PayPal transaction is refunded
This commit is contained in:
commit
a17945d9a8
|
@ -291,7 +291,7 @@ class WC_Gateway_Paypal_IPN_Handler extends WC_Gateway_Paypal_Response {
|
|||
*/
|
||||
protected function payment_status_refunded( $order, $posted ) {
|
||||
// Only handle full refunds, not partial.
|
||||
if ( $order->get_total() === wc_format_decimal( $posted['mc_gross'] * -1 ) ) {
|
||||
if ( $order->get_total() === wc_format_decimal( $posted['mc_gross'] * -1, wc_get_price_decimals() ) ) {
|
||||
|
||||
/* translators: %s: payment status. */
|
||||
$order->update_status( 'refunded', sprintf( __( 'Payment %s via IPN.', 'woocommerce' ), strtolower( $posted['payment_status'] ) ) );
|
||||
|
|
Loading…
Reference in New Issue