Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Issue-530' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Angell committed Aug 16, 2016
2 parents 8e9504c + 5007df5 commit 35065fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions angelleye-includes/angelleye-utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ public function angelleye_paypal_for_woocommerce_order_status_handler($order) {
$this->angelleye_get_transactionDetails($_first_transaction_id);
do_action( 'woocommerce_order_status_pending_to_processing', $order->id );
$order->payment_complete($_first_transaction_id);
do_action('woocommerce_checkout_order_processed', $order->id);
do_action('woocommerce_checkout_order_processed', $order->id, $posted = array());
$order->reduce_order_stock();
}
}
Expand All @@ -998,7 +998,7 @@ public function angelleye_paypal_for_woocommerce_order_status_handler($order) {
$this->angelleye_get_transactionDetails($_first_transaction_id);
do_action( 'woocommerce_order_status_pending_to_processing', $order->id );
$order->payment_complete($_first_transaction_id);
do_action('woocommerce_checkout_order_processed', $order->id);
do_action('woocommerce_checkout_order_processed', $order->id, $posted = array());
$order->reduce_order_stock();
}
}
Expand Down
5 changes: 1 addition & 4 deletions classes/wc-gateway-paypal-express-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ function paypal_express_checkout($posted = null) {
}
$order_id = WC()->checkout()->create_order();

do_action( 'woocommerce_checkout_order_processed', $order_id);
do_action( 'woocommerce_checkout_order_processed', $order_id, $checkout_form_post_data);

/**
* Update meta data with session data
Expand Down Expand Up @@ -1347,11 +1347,8 @@ function paypal_express_checkout($posted = null) {
if ( ! in_array( strtolower( $result['PAYMENTINFO_0_TRANSACTIONTYPE'] ), array( 'cart', 'instant', 'expresscheckout', 'web_accept', 'masspay', 'send_money' ) ) ) {
break;
}

$order->add_order_note( __( 'Payment Completed via Express Checkout', 'paypal-for-woocommerce' ) );
$order->payment_complete($result['PAYMENTINFO_0_TRANSACTIONID']);
do_action('woocommerce_checkout_order_processed', $order_id);

break;
case 'pending' :

Expand Down

0 comments on commit 35065fc

Please sign in to comment.