diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index a9b505ade1..187e049f21 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -55,7 +55,6 @@ async function userSubscriptionPage(req, res) { res, 'bootstrap-5-subscription' ) - await SplitTestHandler.promises.getAssignment(req, res, 'group-pricing-2025') const results = await SubscriptionViewModelBuilder.promises.buildUsersSubscriptionViewModel( diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 130a748b0c..0f7a458ed5 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -444,7 +444,6 @@ "editor_theme": "", "educational_disclaimer": "", "educational_disclaimer_heading": "", - "educational_discount_for_groups_of_x_or_more": "", "educational_percent_discount_applied": "", "email": "", "email_address": "", @@ -832,8 +831,7 @@ "let_us_know_how_we_can_help": "", "let_us_know_what_you_think": "", "library": "", - "license_for_educational_purposes": "", - "license_for_educational_purposes_2025": "", + "license_for_educational_purposes_confirmation": "", "limited_offer": "", "limited_to_n_editors": "", "limited_to_n_editors_per_project": "", @@ -1099,7 +1097,6 @@ "pending_addon_cancellation": "", "pending_invite": "", "per_user": "", - "percent_discount_for_groups": "", "percent_is_the_percentage_of_the_line_width": "", "permanently_disables_the_preview": "", "personal_library": "", @@ -1329,7 +1326,6 @@ "save_or_cancel-cancel": "", "save_or_cancel-or": "", "save_or_cancel-save": "", - "save_x_percent_or_more": "", "saving": "", "saving_notification_with_seconds": "", "search": "", diff --git a/services/web/frontend/js/features/subscription/components/dashboard/states/active/cancel-plan/cancel-subscription.tsx b/services/web/frontend/js/features/subscription/components/dashboard/states/active/cancel-plan/cancel-subscription.tsx index 1b1a3dcf3f..c50666b3fc 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/states/active/cancel-plan/cancel-subscription.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/states/active/cancel-plan/cancel-subscription.tsx @@ -16,7 +16,6 @@ import { useLocation } from '../../../../../../../shared/hooks/use-location' import { debugConsole } from '@/utils/debugging' import OLButton from '@/features/ui/components/ol/ol-button' import moment from 'moment' -import { getSplitTestVariant } from '@/utils/splitTestUtils' import OLNotification from '@/features/ui/components/ol/ol-notification' const planCodeToDowngradeTo = 'paid-personal' @@ -160,8 +159,6 @@ export function CancelSubscription() { isSuccessSecondaryAction || isSuccessCancel - const groupPricingVariant = getSplitTestVariant('group-pricing-2025') - if (!personalSubscription || !('recurly' in personalSubscription)) return null const showDowngrade = showDowngradeOption( @@ -179,7 +176,6 @@ export function CancelSubscription() { const startDate = moment.utc(personalSubscription.recurly.account.created_at) const pricingChangeEffectiveDate = moment.utc('2025-01-08T12:00:00Z') const displayPricingWarning = - groupPricingVariant === 'enabled' && personalSubscription.plan.groupPlan && startDate.isBefore(pricingChangeEffectiveDate) diff --git a/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx b/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx index c5deba1765..96fe6a3dfe 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx @@ -25,10 +25,8 @@ import OLButton from '@/features/ui/components/ol/ol-button' import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' import OLNotification from '@/features/ui/components/ol/ol-notification' import { bsVersion } from '@/features/utils/bootstrap-5' -import { useFeatureFlag } from '@/shared/context/split-test-context' const educationalPercentDiscount = 40 -const groupSizeForEducationalDiscount = 10 function GroupPlanCollaboratorCount({ planCode }: { planCode: string }) { const { t } = useTranslation() @@ -47,34 +45,6 @@ function GroupPlanCollaboratorCount({ planCode }: { planCode: string }) { return null } -function EducationDiscountAppliedOrNot({ - groupSize, - showGroupPricing2025, -}: { - groupSize: string - showGroupPricing2025: boolean -}) { - const { t } = useTranslation() - const size = parseInt(groupSize) - if (size >= groupSizeForEducationalDiscount || showGroupPricing2025) { - return ( -

- {t('educational_percent_discount_applied', { - percent: educationalPercentDiscount, - })} -

- ) - } - - return ( -

- {t('educational_discount_for_groups_of_x_or_more', { - size: groupSizeForEducationalDiscount, - })} -

- ) -} - function GroupPrice({ groupPlanToChangeToPrice, queryingGroupPlanToChangeToPrice, @@ -152,7 +122,6 @@ export function ChangeToGroupModal() { const [error, setError] = useState(false) const [inflight, setInflight] = useState(false) const location = useLocation() - const showGroupPricing2025 = useFeatureFlag('group-pricing-2025') async function upgrade() { setError(false) @@ -203,14 +172,6 @@ export function ChangeToGroupModal() { {t('customize_your_group_subscription')} -
- {!showGroupPricing2025 && ( - - {t('save_x_percent_or_more', { - percent: '30', - })} - - )}
@@ -286,17 +247,6 @@ export function ChangeToGroupModal() { - {!showGroupPricing2025 && ( - - - {t('percent_discount_for_groups', { - percent: educationalPercentDiscount, - size: groupSizeForEducationalDiscount, - })} - - - )} - , - /* eslint-disable-next-line react/jsx-key */ -
, - ]} - /> - ) : ( - t('license_for_educational_purposes') - ) + , + /* eslint-disable-next-line react/jsx-key */ +
, + ]} + /> } /> @@ -333,10 +279,11 @@ export function ChangeToGroupModal() {
{groupPlanToChangeToUsage === 'educational' && ( - +

+ {t('educational_percent_discount_applied', { + percent: educationalPercentDiscount, + })} +

)}
diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 137442ea55..7b55d30854 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -579,7 +579,6 @@ "editor_theme": "Editor theme", "educational_disclaimer": "I confirm that users will be students or faculty using Overleaf primarily for study and teaching, and can provide evidence of this if requested.", "educational_disclaimer_heading": "Educational discount confirmation", - "educational_discount_for_groups_of_x_or_more": "The educational discount is available for groups of __size__ or more", "educational_percent_discount_applied": "__percent__% educational discount applied!", "email": "Email", "email_address": "Email address", @@ -1120,8 +1119,7 @@ "libraries": "Libraries", "library": "Library", "license": "License", - "license_for_educational_purposes": "This license is for educational purposes (applies to students or faculty using __appName__ for teaching)", - "license_for_educational_purposes_2025": "<0>__percent__% educational discount<1/>I confirm this subscription is for educational purposes (applies to students or faculty using __appName__ for teaching)", + "license_for_educational_purposes_confirmation": "<0>__percent__% educational discount<1/>I confirm this subscription is for educational purposes (applies to students or faculty using __appName__ for teaching)", "limited_to_n_editors": "Limited to __count__ editor", "limited_to_n_editors_per_project": "Limited to __count__ editor per project", "limited_to_n_editors_per_project_plural": "Limited to __count__ editors per project", @@ -1495,7 +1493,6 @@ "per_user_per_year": "per user / per year", "per_user_year": "per user / year", "per_year": "per year", - "percent_discount_for_groups": "__appName__ offers a __percent__% educational discount for groups of __size__ or more.", "percent_is_the_percentage_of_the_line_width": "% is the percentage of the line width", "permanently_disables_the_preview": "Permanently disables the preview", "personal": "Personal", @@ -1787,7 +1784,6 @@ "save_or_cancel-cancel": "Cancel", "save_or_cancel-or": "or", "save_or_cancel-save": "Save", - "save_x_percent_or_more": "Save __percent__% or more", "saving": "Saving", "saving_notification_with_seconds": "Saving __docname__... (__seconds__ seconds of unsaved changes)", "search": "Search", diff --git a/services/web/test/frontend/features/subscription/components/dashboard/states/active/change-plan/change-plan.test.tsx b/services/web/test/frontend/features/subscription/components/dashboard/states/active/change-plan/change-plan.test.tsx index 4d7afd5742..5bca8c03d9 100644 --- a/services/web/test/frontend/features/subscription/components/dashboard/states/active/change-plan/change-plan.test.tsx +++ b/services/web/test/frontend/features/subscription/components/dashboard/states/active/change-plan/change-plan.test.tsx @@ -322,7 +322,7 @@ describe('', function () { const standardPlanCollaboratorText = '10 collaborators per project' const professionalPlanCollaboratorText = 'Unlimited collaborators' const educationInputLabel = - 'This license is for educational purposes (applies to students or faculty using Overleaf for teaching)' + '40% educational discountI confirm this subscription is for educational purposes (applies to students or faculty using Overleaf for teaching)' let modal: HTMLElement async function openModal() { @@ -342,7 +342,6 @@ describe('', function () { await openModal() within(modal).getByText('Customize your group subscription') - within(modal).getByText('Save 30% or more') within(modal).getByText('$1,290 per year') expect(within(modal).getAllByText('$129 per user').length).to.equal(2) @@ -369,16 +368,14 @@ describe('', function () { expect(sizeSelect.value).to.equal('10') const sizeOption = within(sizeSelect).getAllByRole('option') expect(sizeOption.length).to.equal(groupPlans.sizes.length) - within(modal).getByText( - 'Overleaf offers a 40% educational discount for groups of 10 or more.' - ) + within(modal).getByText('40% educational discount') const educationalCheckbox = within(modal).getByRole( 'checkbox' ) as HTMLInputElement expect(educationalCheckbox.checked).to.be.false within(modal).getByText( - 'This license is for educational purposes (applies to students or faculty using Overleaf for teaching)' + 'I confirm this subscription is for educational purposes (applies to students or faculty using Overleaf for teaching)' ) within(modal).getByText( @@ -406,10 +403,8 @@ describe('', function () { expect(within(modal).queryByText(standardPlanCollaboratorText)).to.be.null }) - it('shows educational discount applied when input checked and also notes if not enough users to get discount', async function () { + it('shows educational discount applied when input checked', async function () { const discountAppliedText = '40% educational discount applied!' - const discountNotAppliedText = - 'The educational discount is available for groups of 10 or more' renderActiveSubscription(annualActiveSubscription) await openModal() @@ -417,12 +412,10 @@ describe('', function () { const educationInput = within(modal).getByLabelText(educationInputLabel) fireEvent.click(educationInput) await within(modal).findByText(discountAppliedText) - expect(within(modal).queryByText(discountNotAppliedText)).to.be.null const sizeSelect = within(modal).getByRole('combobox') as HTMLInputElement await userEvent.selectOptions(sizeSelect, [screen.getByText('5')]) - await within(modal).findByText(discountNotAppliedText) - expect(within(modal).queryByText(discountAppliedText)).to.be.null + await within(modal).findByText(discountAppliedText) }) it('shows total with tax when tax applied', async function () {