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

🐛 Fixed welcome pages when Tiers is enabled

no-issue

The welcome pages feature was moved behind a separate flag and this part
of the code was not updated.
This commit is contained in:
Fabien "egg" O'Carroll 2022-02-09 18:42:40 +02:00 committed by Fabien 'egg' O'Carroll
parent 3e7039c47d
commit 3a0fa8d7d8

View file

@ -208,13 +208,13 @@ const createSessionFromMagicLink = async function (req, res, next) {
})
.find(sub => ['active', 'trialing'].includes(sub.status));
if (mostRecentActiveSubscription) {
if (labsService.isSet('multipleProducts')) {
if (labsService.isSet('tierWelcomePages')) {
customRedirect = mostRecentActiveSubscription.tier.welcome_page_url;
} else {
customRedirect = settingsCache.get('members_paid_signup_redirect') || '';
}
} else {
if (labsService.isSet('multipleProducts')) {
if (labsService.isSet('tierWelcomePages')) {
const freeTier = await models.Product.findOne({type: 'free'});
customRedirect = freeTier && freeTier.get('welcome_page_url') || '';
} else {