Remove continuation context

This commit is contained in:
Alex P. 2024-09-23 09:10:49 +03:00
parent f77d08133d
commit f0e2ca2b5b
No known key found for this signature in database
GPG key ID: 54487A734A204D71
3 changed files with 5 additions and 7 deletions

View file

@ -167,7 +167,7 @@ class AxoModule implements ServiceModule, ExtendingModule, ExecutableModule {
// Check if the module is applicable, correct country, currency, ... etc.
if ( ! $is_paypal_enabled
|| ! $c->get( 'axo.eligible' )
|| 'continuation' === $c->get( 'button.context' )
|| $this->is_paypal_continuation()
|| $subscription_helper->cart_contains_subscription()
) {
return;

View file

@ -173,10 +173,6 @@ 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 );

View file

@ -31,8 +31,10 @@ import moduleStorage from './Helper/GooglePayStorage';
}
function bootstrapCheckout() {
if ( context && ! [ 'continuation', 'checkout' ].includes( context ) ) {
// Context must be missing/empty, or "continuation"/"checkout" to proceed.
if ( context
&& ! [ 'checkout' ].includes( context )
&& ! (context === 'mini-cart' && ppcpConfig.continuation) ) {
// Context must be missing/empty, or "checkout"/checkout continuation to proceed.
return;
}
if ( ! CheckoutBootstrap.isPageWithCheckoutForm() ) {