Add logic to enable/disable PayPal subscriptions feature

This commit is contained in:
emilicastells 2023-01-16 12:37:16 +01:00
parent 71c1937808
commit 72eb713fd4
No known key found for this signature in database
GPG key ID: 1520C07081754570
7 changed files with 49 additions and 10 deletions

View file

@ -106,7 +106,10 @@ return array(
$product_intent = $subscription_helper->current_product_is_subscription() ? 'authorize' : $intent;
$other_context_intent = $subscription_helper->cart_contains_subscription() ? 'authorize' : $intent;
if ( $settings->has( 'subscription_handler' ) && $settings->get( 'subscription_handler' ) ) {
if (
$settings->has( 'subscription_handler' )
&& $settings->get( 'subscription_handler' ) === true
) {
return 'subscription';
}