Merge pull request #22304 from overleaf/mf-clean-up-latam-v2-test

[web] Tear down LATAM geo-pricing v2 split test

GitOrigin-RevId: ca379c7ace5600aa31559c82e166c7ea67c6c26d
This commit is contained in:
M Fahru
2024-12-09 10:13:50 -07:00
committed by Copybot
parent a49cec6843
commit ff7bd5718b
4 changed files with 165 additions and 310 deletions
@@ -396,13 +396,6 @@ async function projectListPage(req, res, next) {
usersBestSubscription?.type === 'free' ||
usersBestSubscription?.type === 'standalone-ai-add-on'
) {
const latamGeoPricingAssignment =
await SplitTestHandler.promises.getAssignment(
req,
res,
'geo-pricing-latam-v2'
)
const { countryCode, currencyCode } =
await GeoIpLookup.promises.getCurrencyCode(req.ip)
@@ -411,9 +404,7 @@ async function projectListPage(req, res, next) {
}
showBrlGeoBanner = countryCode === 'BR'
showLATAMBanner =
latamGeoPricingAssignment.variant === 'latam' &&
['MX', 'CO', 'CL', 'PE'].includes(countryCode)
showLATAMBanner = ['MX', 'CO', 'CL', 'PE'].includes(countryCode)
// LATAM Banner needs to know which currency to display
if (showLATAMBanner) {
recommendedCurrency = currencyCode