mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +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_order->payment_complete();
|
||||||
WC()->session->set( 'ppcp_subscription_id', '' );
|
|
||||||
|
|
||||||
return $this->handle_payment_success( $wc_order );
|
return $this->handle_payment_success( $wc_order );
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,7 @@ trait ProcessPaymentTrait {
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->session_handler->destroy_session_data();
|
$this->session_handler->destroy_session_data();
|
||||||
|
WC()->session->set( 'ppcp_subscription_id', '' );
|
||||||
|
|
||||||
wc_add_notice( $error->getMessage(), 'error' );
|
wc_add_notice( $error->getMessage(), 'error' );
|
||||||
|
|
||||||
|
@ -100,6 +101,7 @@ trait ProcessPaymentTrait {
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->session_handler->destroy_session_data();
|
$this->session_handler->destroy_session_data();
|
||||||
|
WC()->session->set( 'ppcp_subscription_id', '' );
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'result' => 'success',
|
'result' => 'success',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue