Merge pull request #36302 from overleaf/oa-teardown-trial-ineligible-cta

[web] Teardown trial ineligible cta

GitOrigin-RevId: 4d114943bc2839b29b6eae3a133d6c235f98ffcc
This commit is contained in:
Olzhas Askar
2026-09-17 11:50:24 +00:00
committed by Copybot
parent 58d76ff1a0
commit f513b1aa52
25 changed files with 5 additions and 60 deletions
@@ -528,7 +528,7 @@ const _ProjectController = {
user: (async () => {
const user = await User.findById(
userId,
'email first_name last_name referal_id signUpDate featureSwitches features featuresEpoch refProviders alphaProgram betaProgram isAdmin ace labsProgram labsExperiments completedTutorials writefull aiFeatures lastTrial'
'email first_name last_name referal_id signUpDate featureSwitches features featuresEpoch refProviders alphaProgram betaProgram isAdmin ace labsProgram labsExperiments completedTutorials writefull aiFeatures'
).exec()
// Handle case of deleted user
if (!user) {
@@ -642,15 +642,6 @@ const _ProjectController = {
subscription == null ||
isStandaloneAiAddOnPlanCode(subscription.planCode)
// The test's audience: free users who've spent their trial and can't start
// another, yet still see a misleading "free trial" CTA.
const trialIneligible =
!anonymous && allowedFreeTrial && Boolean(user?.lastTrial)
if (trialIneligible) {
splitTests.push('paywall-cta-trial-ineligible')
}
const splitTestAssignments = Object.fromEntries(
await Promise.all(
splitTests.map(async splitTest => [