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

Included benefits with theme product data (#14051)

refs https://github.com/TryGhost/Team/issues/1079

These were missing when benefits were added to products, and will allow
theme developers to make more useful custom subscribe pages.
This commit is contained in:
Fabien 'egg' O'Carroll 2022-01-24 13:55:25 +02:00 committed by GitHub
parent 410c1d54cd
commit 01f30eb632
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -48,7 +48,7 @@ function calculateLegacyPriceData(products) {
async function getProductAndPricesData() {
try {
const page = await api.canary.productsPublic.browse({
include: ['monthly_price', 'yearly_price'],
include: ['monthly_price', 'yearly_price', 'benefits'],
limit: 'all',
filter: 'active:true'
});

View file

@ -2,7 +2,7 @@
// as it is a getter and may change during runtime.
const membersService = require('../../services/members');
const allowedIncludes = ['stripe_prices', 'monthly_price', 'yearly_price'];
const allowedIncludes = ['stripe_prices', 'monthly_price', 'yearly_price', 'benefits'];
module.exports = {
docName: 'products',