Fixed paid flag on members

refs https://github.com/TryGhost/Ghost/issues/12602

As part of the member events, we added a third status of 'comped'.
Members with a status of 'comped' should still be considered paid, so
this fixes the definition of the paid flag to take that into account.
This commit is contained in:
Fabien O'Carroll 2021-02-25 14:23:36 +00:00
parent 7f29bbff8a
commit 3eb8b91a6b
2 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ function updateLocalTemplateOptions(req, res, next) {
default_payment_card_last4: sub.default_payment_card_last4 || '****'
});
}),
paid: req.member.status === 'paid'
paid: req.member.status !== 'free'
} : null;
hbs.updateLocalTemplateOptions(res.locals, _.merge({}, localTemplateOptions, {

View File

@ -10,6 +10,6 @@ module.exports.formattedMemberResponse = function formattedMemberResponse(member
avatar_image: member.avatar_image,
subscribed: !!member.subscribed,
subscriptions: member.subscriptions || [],
paid: member.status === 'paid'
paid: member.status !== 'free'
};
};