Bail if its subscription

This commit is contained in:
carmenmaymo 2023-09-08 12:52:19 +02:00
parent e956115da8
commit 9139c54cec
No known key found for this signature in database
GPG key ID: 6023F686B0F3102E

View file

@ -41,6 +41,10 @@ class ApplepayButton {
const isEligible = this.applePayConfig.isEligible;
if (isEligible) {
this.fetchTransactionInfo().then(() => {
const isSubscriptionProduct = this.ppcpConfig.data_client_id.has_subscriptions === true;
if(isSubscriptionProduct) {
return;
}
this.addButton();
document.querySelector('#btn-appl').addEventListener('click', (evt) => {
evt.preventDefault();