mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Merge pull request #3570 from woocommerce/PCP-5034-block-checkout-proceed-to-pay-pal-endless-loop-unable-to-complete-transaction
Fix endless redirect bug for the PayPal button (5034)
This commit is contained in:
commit
e75d7085e0
1 changed files with 7 additions and 0 deletions
|
@ -109,6 +109,13 @@ class ReturnUrlEndpoint {
|
|||
}
|
||||
}
|
||||
|
||||
// Replace session order for approved/completed orders.
|
||||
if ( $order->status()->is( OrderStatus::APPROVED )
|
||||
|| $order->status()->is( OrderStatus::COMPLETED )
|
||||
) {
|
||||
$this->session_handler->replace_order( $order );
|
||||
}
|
||||
|
||||
$wc_order_id = (int) $order->purchase_units()[0]->custom_id();
|
||||
if ( ! $wc_order_id ) {
|
||||
// We cannot finish processing here without WC order, but at least go into the continuation mode.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue