0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-25 02:31:59 -05:00

Updated member.plans to member.stripe.subscriptions

no-issue

This is to support the new format in which stripe information is
returned from the members-api module.
This commit is contained in:
Fabien O'Carroll 2019-09-25 13:31:33 +07:00
parent 97bf329ee2
commit a6fa0bc043
3 changed files with 3 additions and 3 deletions

View file

@ -80,7 +80,7 @@ function updateLocalTemplateOptions(req, res, next) {
const member = req.member ? {
email: req.member.email,
subscribed: req.member.plans.length !== 0
subscribed: req.member.stripe.subscriptions.length !== 0
} : null;
hbs.updateLocalTemplateOptions(res.locals, _.merge({}, localTemplateOptions, {

View file

@ -22,7 +22,7 @@ function hideMembersOnlyContent(attrs, frame) {
return BLOCK_CONTENT;
}
const memberHasPlan = !!(frame.original.context.member.plans || []).length;
const memberHasPlan = !!(frame.original.context.member.stripe.subscriptions || []).length;
if (!membersService.isPaymentConfigured()) {
return PERMIT_CONTENT;
}

View file

@ -22,7 +22,7 @@ function hideMembersOnlyContent(attrs, frame) {
return BLOCK_CONTENT;
}
const memberHasPlan = !!(frame.original.context.member.plans || []).length;
const memberHasPlan = !!(frame.original.context.member.stripe.subscriptions).length;
if (!membersService.isPaymentConfigured()) {
return PERMIT_CONTENT;
}