From 28e396b3046b19a731d144adaa1f7e0e20b07d6c Mon Sep 17 00:00:00 2001 From: kcppdevelopers Date: Tue, 21 Jun 2016 15:50:53 +0530 Subject: [PATCH] Seller Protection Auto Cancel/Refund Adjustment, ref #486 --- angelleye-includes/angelleye-utility.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/angelleye-includes/angelleye-utility.php b/angelleye-includes/angelleye-utility.php index cdf4fa281..23db8452d 100644 --- a/angelleye-includes/angelleye-utility.php +++ b/angelleye-includes/angelleye-utility.php @@ -979,11 +979,7 @@ public function angelleye_paypal_for_woocommerce_order_status_handler($order) { if ($order->order_total <= $this->total_Completed_DoAuthorization && $this->total_Pending_DoAuthorization == 0) { $_first_transaction_id = get_post_meta($order->id, '_first_transaction_id', true); $this->angelleye_get_transactionDetails($_first_transaction_id); - $update_post_data = array( - 'ID' => $order->id, - 'post_status' => 'wc-pending', - ); - wp_update_post( $update_post_data ); + do_action( 'woocommerce_order_status_pending_to_processing', $order->id ); $order->payment_complete($_first_transaction_id); do_action('woocommerce_checkout_order_processed', $order->id); } @@ -998,11 +994,7 @@ public function angelleye_paypal_for_woocommerce_order_status_handler($order) { if ($order->order_total == $this->total_Completed_DoAuthorization && $this->total_Pending_DoAuthorization == 0) { $_first_transaction_id = get_post_meta($order->id, '_first_transaction_id', true); $this->angelleye_get_transactionDetails($_first_transaction_id); - $update_post_data = array( - 'ID' => $order->id, - 'post_status' => 'wc-pending', - ); - wp_update_post( $update_post_data ); + do_action( 'woocommerce_order_status_pending_to_processing', $order->id ); $order->payment_complete($_first_transaction_id); do_action('woocommerce_checkout_order_processed', $order->id); }