From d7b64ef92e041eece0198aafa0c29f21656d4884 Mon Sep 17 00:00:00 2001 From: Jessica Lawshe <5312836+lawshe@users.noreply.github.com> Date: Wed, 5 Jun 2024 10:20:32 -0500 Subject: [PATCH] Merge pull request #18718 from overleaf/jel-isSplitTestActive-plans-page [web] New plans page variants only loadable if test is active GitOrigin-RevId: 2b29dc8a3ecef6dd8f34dd25e59bf48a9724061b --- .../src/Features/Subscription/SubscriptionController.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index 8bbb8eace1..0a7f701d57 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -139,6 +139,14 @@ async function plansPage(req, res) { } async function plansPageLightDesign(req, res) { + const splitTestActive = await SplitTestHandler.promises.isSplitTestActive( + 'website-redesign-plans' + ) + + if (!splitTestActive && req.query.preview !== 'true') { + return res.redirect(302, '/user/subscription/plans') + } + res.render('subscriptions/plans-light-design', { title: 'plans_and_pricing', })