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:
parent
97bf329ee2
commit
a6fa0bc043
3 changed files with 3 additions and 3 deletions
|
@ -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, {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue