From ec28b890fafc54d725548c4d139f7eeab7a5ebda Mon Sep 17 00:00:00 2001 From: Dat Hoang Date: Wed, 2 Sep 2020 00:05:49 +0700 Subject: [PATCH] Fixed depreciated cancel_order method --- inc/onepay/abstract-payment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/onepay/abstract-payment.php b/inc/onepay/abstract-payment.php index 348ec08..c2608c5 100644 --- a/inc/onepay/abstract-payment.php +++ b/inc/onepay/abstract-payment.php @@ -272,7 +272,7 @@ abstract class WooViet_OnePay_Abstract extends WC_Payment_Gateway { break; case '99': // If the user cancels payment, cancel the order - $order->cancel_order(); + $order->update_status( 'cancelled' ); break; default: // For other cases, do nothing. By default, the order status is still "Pending Payment"