diff --git a/angelleye-includes/angelleye-utility.php b/angelleye-includes/angelleye-utility.php index 97cefb217..cdf4fa281 100644 --- a/angelleye-includes/angelleye-utility.php +++ b/angelleye-includes/angelleye-utility.php @@ -979,7 +979,13 @@ 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 ); $order->payment_complete($_first_transaction_id); + do_action('woocommerce_checkout_order_processed', $order->id); } } @@ -992,7 +998,13 @@ 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 ); $order->payment_complete($_first_transaction_id); + do_action('woocommerce_checkout_order_processed', $order->id); } } }