mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Do not enter the checkout continuation state for dcc
it supposed to be used only for PayPal payments started on the product or cart pages
This commit is contained in:
parent
d80c051141
commit
5e547c79cc
2 changed files with 26 additions and 3 deletions
|
@ -59,10 +59,17 @@ class CancelController {
|
|||
) { // Input var ok.
|
||||
$this->session_handler->destroy_session_data();
|
||||
}
|
||||
if ( ! $this->session_handler->order() ) {
|
||||
|
||||
$order = $this->session_handler->order();
|
||||
if ( ! $order ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$source = $order->payment_source();
|
||||
if ( $source && $source->card() ) {
|
||||
return; // Ignore for DCC.
|
||||
}
|
||||
|
||||
$url = add_query_arg( array( $param_name => wp_create_nonce( $nonce ) ), wc_get_checkout_url() );
|
||||
add_action(
|
||||
'woocommerce_review_order_after_submit',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue