mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
Merge pull request #36302 from overleaf/oa-teardown-trial-ineligible-cta
[web] Teardown trial ineligible cta GitOrigin-RevId: 4d114943bc2839b29b6eae3a133d6c235f98ffcc
This commit is contained in:
@@ -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 => [
|
||||
|
||||
Reference in New Issue
Block a user