Merge pull request #2745 from woocommerce/PCP-3615-acdc-not-visible-on-checkut-when-fastlane-enabled-and-subscription-product-in-cart

Load ACDC for Classic and Block checkouts for subscription products (3615)
This commit is contained in:
Emili Castells 2024-11-18 13:59:01 +01:00 committed by GitHub
commit 594c9eb63b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 55 additions and 32 deletions

View file

@ -377,11 +377,15 @@ class AxoModule implements ServiceModule, ExtendingModule, ExecutableModule {
$dcc_configuration = $c->get( 'wcgateway.configuration.dcc' );
assert( $dcc_configuration instanceof DCCGatewayConfiguration );
$subscription_helper = $c->get( 'wc-subscriptions.helper' );
assert( $subscription_helper instanceof SubscriptionHelper );
return ! is_user_logged_in()
&& CartCheckoutDetector::has_classic_checkout()
&& $dcc_configuration->use_fastlane()
&& ! $this->is_excluded_endpoint()
&& is_checkout();
&& is_checkout()
&& ! $subscription_helper->cart_contains_subscription();
}
/**