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:
parent
14a7d1f00f
commit
9b0259dc6f
1 changed files with 2 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue