mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
Move subscription id session clear to payment handlers
This commit is contained in:
parent
ac22a25f4f
commit
f161ca7ec8
2 changed files with 2 additions and 1 deletions
|
@ -543,7 +543,6 @@ class PayPalGateway extends \WC_Payment_Gateway {
|
|||
}
|
||||
|
||||
$wc_order->payment_complete();
|
||||
WC()->session->set( 'ppcp_subscription_id', '' );
|
||||
|
||||
return $this->handle_payment_success( $wc_order );
|
||||
}
|
||||
|
|
|
@ -77,6 +77,7 @@ trait ProcessPaymentTrait {
|
|||
}
|
||||
|
||||
$this->session_handler->destroy_session_data();
|
||||
WC()->session->set( 'ppcp_subscription_id', '' );
|
||||
|
||||
wc_add_notice( $error->getMessage(), 'error' );
|
||||
|
||||
|
@ -100,6 +101,7 @@ trait ProcessPaymentTrait {
|
|||
}
|
||||
|
||||
$this->session_handler->destroy_session_data();
|
||||
WC()->session->set( 'ppcp_subscription_id', '' );
|
||||
|
||||
return array(
|
||||
'result' => 'success',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue