mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Remove continuation context
This commit is contained in:
parent
f77d08133d
commit
f0e2ca2b5b
3 changed files with 5 additions and 7 deletions
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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() ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue