Load ACDC for Classic and Block checkouts for subscription products

This commit is contained in:
Daniel Dudzic 2024-10-30 22:25:39 +01:00
parent e664052b62
commit 4a688fb351
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
4 changed files with 55 additions and 32 deletions

View file

@ -375,11 +375,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();
}
/**