Fixed depreciated cancel_order method

This commit is contained in:
Dat Hoang
2020-09-02 00:05:49 +07:00
parent 9bc9726151
commit ec28b890fa
+1 -1
View File
@@ -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"