2021-03-25 10:21:28 +02:00
|
|
|
;document.addEventListener(
|
|
|
|
'DOMContentLoaded',
|
|
|
|
() => {
|
2021-11-20 12:51:11 -03:00
|
|
|
const disabledCheckboxes = document.querySelectorAll(
|
2021-11-23 22:12:32 -03:00
|
|
|
'.ppcp-disabled-checkbox'
|
2021-11-20 12:51:11 -03:00
|
|
|
)
|
|
|
|
|
2021-03-25 10:21:28 +02:00
|
|
|
function disableAll(nodeList){
|
|
|
|
nodeList.forEach(node => node.setAttribute('disabled', 'true'))
|
|
|
|
}
|
|
|
|
|
2021-11-20 14:38:36 -03:00
|
|
|
disableAll( disabledCheckboxes )
|
2022-09-02 12:59:53 +02:00
|
|
|
|
|
|
|
if(PayPalCommerceGatewaySettings.is_subscriptions_plugin_active !== '1') {
|
2022-10-31 15:58:19 +04:00
|
|
|
const subscriptionBehaviorWhenVaultFails = document.getElementById('field-subscription_behavior_when_vault_fails');
|
|
|
|
if (subscriptionBehaviorWhenVaultFails) {
|
|
|
|
subscriptionBehaviorWhenVaultFails.style.display = 'none'
|
|
|
|
}
|
2022-09-02 12:59:53 +02:00
|
|
|
}
|
2021-03-25 10:21:28 +02:00
|
|
|
}
|
2021-03-25 17:17:04 +02:00
|
|
|
);
|