0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Removed usage of dashboardV5 feature flag

refs https://github.com/TryGhost/Team/issues/1616
This commit is contained in:
Simon Backx 2022-05-25 10:29:44 +02:00
parent 14a7d1f00f
commit 9b0259dc6f

View file

@ -112,15 +112,13 @@ module.exports = class MemberRepository {
return 0;
}
const matchStripeBehaviour = this._labsService.isSet('dashboardV5');
if (matchStripeBehaviour && canceled) {
if (canceled) {
return 0;
}
let amountWithDiscount = amount;
if (matchStripeBehaviour && discount && discount.end === null && discount.coupon && discount.coupon.duration === 'forever') {
if (discount && discount.end === null && discount.coupon && discount.coupon.duration === 'forever') {
// Discounts should only get applied when they are 'forever' discounts / they don't have an end date
if (discount.coupon.amount_off !== null) {
amountWithDiscount = Math.max(0, amountWithDiscount - discount.coupon.amount_off);