Force final confirmation grayed out when subscription plugin is active

This commit is contained in:
Narek Zakarian 2024-05-17 15:47:52 +04:00
parent d787e2e85d
commit cd8bfbec2f
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -51,6 +51,8 @@ return array(
);
}
$subscription_helper = $container->get( 'wc-subscriptions.helper' );
return $insert_after(
$fields,
'smart_button_locations',
@ -63,6 +65,8 @@ return array(
'screens' => array( State::STATE_START, State::STATE_ONBOARDED ),
'requirements' => array(),
'gateway' => 'paypal',
'class' => array( 'ppcp-grayed-out-text' ),
'input_class' => $subscription_helper->plugin_is_active() ? array( 'ppcp-disabled-checkbox' ) : array(),
),
)
);