mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Merge pull request #2398 from woocommerce/PCP-3295-billing-details-for-guest-user-on-short-checkout-greyed-out-and-payment-not-possible-when-fastlane-enabled-part-2
AXO: Prevent loading scripts and executing logic in continuation mode (3295)
This commit is contained in:
commit
cb624eb3bf
2 changed files with 7 additions and 4 deletions
|
@ -148,7 +148,7 @@ class AxoModule implements ModuleInterface {
|
||||||
$module = $this;
|
$module = $this;
|
||||||
|
|
||||||
// Check if the module is applicable, correct country, currency, ... etc.
|
// Check if the module is applicable, correct country, currency, ... etc.
|
||||||
if ( ! $c->get( 'axo.eligible' ) ) {
|
if ( ! $c->get( 'axo.eligible' ) || 'continuation' === $c->get( 'button.context' ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,6 +252,8 @@ class AxoModule implements ModuleInterface {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Add the markup necessary for displaying overlays and loaders for Axo on the checkout page.
|
||||||
|
$this->add_checkout_loader_markup( $c );
|
||||||
},
|
},
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
@ -265,9 +267,6 @@ class AxoModule implements ModuleInterface {
|
||||||
$endpoint->handle_request();
|
$endpoint->handle_request();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add the markup necessary for displaying overlays and loaders for Axo on the checkout page.
|
|
||||||
$this->add_checkout_loader_markup( $c );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -137,6 +137,10 @@ trait ContextTrait {
|
||||||
case $this->is_block_editor():
|
case $this->is_block_editor():
|
||||||
$context = 'block-editor';
|
$context = 'block-editor';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case $this->is_paypal_continuation():
|
||||||
|
$context = 'continuation';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return apply_filters( 'woocommerce_paypal_payments_context', $context );
|
return apply_filters( 'woocommerce_paypal_payments_context', $context );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue