From 0c43ee467d994b828f1f3e5f925b84ac8b50ac3b Mon Sep 17 00:00:00 2001 From: htdat Date: Sun, 2 Jul 2017 18:08:37 +0700 Subject: [PATCH] Fix: Error in WooCommerce 3.0.x - order->id - #24 --- inc/class-wooviet-onepay-domestic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/class-wooviet-onepay-domestic.php b/inc/class-wooviet-onepay-domestic.php index ddc69c7..ad39401 100644 --- a/inc/class-wooviet-onepay-domestic.php +++ b/inc/class-wooviet-onepay-domestic.php @@ -105,9 +105,9 @@ class WooViet_OnePay_Domestic extends WC_Payment_Gateway { 'Title' => __( 'OnePay Payment Title', 'woo-viet' ), 'vpc_Merchant' => $this->merchant_id, 'vpc_AccessCode' => $this->access_code, - 'vpc_MerchTxnRef' => sprintf( '%1$s_%2$s', $order->id, date( 'YmdHis' ) ), + 'vpc_MerchTxnRef' => sprintf( '%1$s_%2$s', $order->get_id(), date( 'YmdHis' ) ), 'vpc_OrderInfo' => substr( - sprintf( 'Order #%1$s - %2$s', $order->id, get_home_url() ), + sprintf( 'Order #%1$s - %2$s', $order->get_id(), get_home_url() ), 0, 32 ), // Limit 32 characters 'vpc_Amount' => $order->get_total() * 100, // Multiplying 100 is a requirement from OnePay