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:
Emili Castells 2024-07-09 11:10:41 +02:00 committed by GitHub
commit cb624eb3bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -148,7 +148,7 @@ class AxoModule implements ModuleInterface {
$module = $this;
// 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;
}
@ -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
);
@ -265,9 +267,6 @@ class AxoModule implements ModuleInterface {
$endpoint->handle_request();
}
);
// Add the markup necessary for displaying overlays and loaders for Axo on the checkout page.
$this->add_checkout_loader_markup( $c );
}
/**

View file

@ -137,6 +137,10 @@ trait ContextTrait {
case $this->is_block_editor():
$context = 'block-editor';
break;
case $this->is_paypal_continuation():
$context = 'continuation';
break;
}
return apply_filters( 'woocommerce_paypal_payments_context', $context );