diff --git a/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php b/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php index c80a9cd93b2..ed9cb2acf15 100644 --- a/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php +++ b/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php @@ -40,7 +40,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce { * @return array */ public function process_subscription( $order_id ) { - $order = new WC_Order( $order_id ); + $order = wc_get_order( $order_id ); $token = isset( $_POST['simplify_token'] ) ? wc_clean( $_POST['simplify_token'] ) : ''; try { @@ -118,7 +118,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce { */ public function process_pre_order( $order_id ) { if ( WC_Pre_Orders_Order::order_requires_payment_tokenization( $order_id ) ) { - $order = new WC_Order( $order_id ); + $order = wc_get_order( $order_id ); $token = isset( $_POST['simplify_token'] ) ? wc_clean( $_POST['simplify_token'] ) : ''; try { diff --git a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php index cce2376024e..0c184548688 100644 --- a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php +++ b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php @@ -269,7 +269,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway { * @param integer $order_id */ public function process_payment( $order_id ) { - $order = new WC_Order( $order_id ); + $order = wc_get_order( $order_id ); $token = isset( $_POST['simplify_token'] ) ? wc_clean( $_POST['simplify_token'] ) : ''; try {