Skip to content

Commit

Permalink
add pending status, ref #486
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed Jun 21, 2016
1 parent 15d5ed3 commit 8dd5846
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions angelleye-includes/angelleye-utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}
}
Expand Down

0 comments on commit 8dd5846

Please sign in to comment.