Skip to content

Commit 32713ae

Browse files
committed
Disable automatic Winter 2025 Sale discount
1 parent ee8dbf9 commit 32713ae

2 files changed

Lines changed: 30 additions & 32 deletions

File tree

assets/js/androidkey.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ class AndroidLicense {
4141
}).catch(() => {
4242
this._checkoutData.errorMessage = 'Retrieving price failed. Please try again later.';
4343
});
44-
let discountedRequest = {
45-
items: [{ priceId: PADDLE_ANDROID_PRICE_ID, quantity: 1}],
46-
discountId: PADDLE_DISCOUNT_ID
47-
};
48-
paddle.PricePreview(discountedRequest).then(discountedResult => {
49-
if (Number(discountedResult.data.details.lineItems[0].totals.discount) > 0) {
50-
this._checkoutData.discountedPrice = {
51-
amount: discountedResult.data.details.lineItems[0].totals.total,
52-
formattedAmount: discountedResult.data.details.lineItems[0].formattedTotals.total
53-
};
54-
}
55-
}).catch(error => {
56-
this._checkoutData.errorMessage = 'Retrieving discounted price failed. Please try again later.';
57-
});
44+
// let discountedRequest = {
45+
// items: [{ priceId: PADDLE_ANDROID_PRICE_ID, quantity: 1}],
46+
// discountId: PADDLE_DISCOUNT_ID
47+
// };
48+
// paddle.PricePreview(discountedRequest).then(discountedResult => {
49+
// if (Number(discountedResult.data.details.lineItems[0].totals.discount) > 0) {
50+
// this._checkoutData.discountedPrice = {
51+
// amount: discountedResult.data.details.lineItems[0].totals.total,
52+
// formattedAmount: discountedResult.data.details.lineItems[0].formattedTotals.total
53+
// };
54+
// }
55+
// }).catch(error => {
56+
// this._checkoutData.errorMessage = 'Retrieving discounted price failed. Please try again later.';
57+
// });
5858
});
5959
}
6060

@@ -77,8 +77,7 @@ class AndroidLicense {
7777
paddle.Checkout.open({
7878
settings: { locale: locale },
7979
items: [{ priceId: PADDLE_ANDROID_PRICE_ID, quantity: 1 }],
80-
customer: { email: this._checkoutData.email },
81-
discountCode: PADDLE_DISCOUNT_CODE
80+
customer: { email: this._checkoutData.email }
8281
});
8382
});
8483
}

assets/js/desktopkey.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,20 @@ class DesktopLicense {
4444
}).catch(() => {
4545
this._checkoutData.errorMessage = 'Retrieving prices failed. Please try again later.';
4646
});
47-
let discountedRequest = {
48-
items: [{ priceId: PADDLE_DESKTOP_PRICE_IDS[0], quantity: 1 }],
49-
discountId: PADDLE_DISCOUNT_ID
50-
};
51-
paddle.PricePreview(discountedRequest).then(discountedResult => {
52-
if (Number(discountedResult.data.details.lineItems[0].totals.discount) > 0) {
53-
this._checkoutData.discountedPrice = {
54-
amount: discountedResult.data.details.lineItems[0].totals.total,
55-
formattedAmount: discountedResult.data.details.lineItems[0].formattedTotals.total
56-
};
57-
}
58-
}).catch(() => {
59-
this._checkoutData.errorMessage = 'Retrieving discounted price failed. Please try again later.';
60-
});
47+
// let discountedRequest = {
48+
// items: [{ priceId: PADDLE_DESKTOP_PRICE_IDS[0], quantity: 1 }],
49+
// discountId: PADDLE_DISCOUNT_ID
50+
// };
51+
// paddle.PricePreview(discountedRequest).then(discountedResult => {
52+
// if (Number(discountedResult.data.details.lineItems[0].totals.discount) > 0) {
53+
// this._checkoutData.discountedPrice = {
54+
// amount: discountedResult.data.details.lineItems[0].totals.total,
55+
// formattedAmount: discountedResult.data.details.lineItems[0].formattedTotals.total
56+
// };
57+
// }
58+
// }).catch(() => {
59+
// this._checkoutData.errorMessage = 'Retrieving discounted price failed. Please try again later.';
60+
// });
6161
});
6262
}
6363

@@ -80,8 +80,7 @@ class DesktopLicense {
8080
paddle.Checkout.open({
8181
settings: { locale: locale },
8282
items: [{ priceId: priceId, quantity: Number.parseInt(this._checkoutData.quantity) }],
83-
customer: { email: this._checkoutData.email },
84-
discountCode: PADDLE_DISCOUNT_CODE
83+
customer: { email: this._checkoutData.email }
8584
});
8685
});
8786
}

0 commit comments

Comments
 (0)