Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

billing: Replace legacy plan languagae with complimentary access.

Lauryn Menard36210c1ff389
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index 71a02108146..3841e927428 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -2579,7 +2579,7 @@ class BillingSession(ABC):
),
"discount_percent": plan.discount,
"is_self_hosted_billing": is_self_hosted_billing,
- "is_server_on_legacy_plan": remote_server_legacy_plan_end_date is not None,
+ "complimentary_access_plan": remote_server_legacy_plan_end_date is not None,
"remote_server_legacy_plan_end_date": remote_server_legacy_plan_end_date,
"legacy_remote_server_next_plan_name": legacy_remote_server_next_plan_name,
"using_min_licenses_for_plan": using_min_licenses_for_plan,
diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py
index dc73391ef92..cfd4b52bc12 100644
--- a/corporate/tests/test_stripe.py
+++ b/corporate/tests/test_stripe.py
@@ -9057,8 +9057,8 @@ class TestRemoteServerBillingFlow(StripeTestCase, RemoteServerTestCase):
with time_machine.travel(self.now, tick=False):
response = self.client_get(f"{billing_base_url}/billing/", subdomain="selfhosting")
for substring in [
- "(legacy plan)",
- f"This is a legacy plan that ends on {end_date.strftime('%B %d, %Y')}",
+ "(complimentary access)",
+ f"Your complimentary access to Zulip Basic ends on {end_date.strftime('%B %d, %Y')}",
f"Your plan will automatically upgrade to Zulip Business on {end_date.strftime('%B %d, %Y')}",
"Expected next charge",
f"${80 * 25 - 20 * 12:,.2f}",
diff --git a/templates/corporate/billing/billing.html b/templates/corporate/billing/billing.html
index fa62ef0ccaa..27fa199e3ac 100644
--- a/templates/corporate/billing/billing.html
+++ b/templates/corporate/billing/billing.html
@@ -48,11 +48,11 @@
<a href="{{ billing_base_url }}/plans/">
{{ plan_name }} <i>(free trial)</i>
</a>
- {% elif is_server_on_legacy_plan %}
+ {% elif complimentary_access_plan %}
<a href="{{ billing_base_url }}/plans/">
- {{ plan_name.replace(" (legacy plan)", "") -}}
+ Zulip Basic
</a>
- <i>(legacy plan)</i>
+ <i>(complimentary access)</i>
{% else %}
<a href="{{ billing_base_url }}/plans/">
{{ plan_name }}
@@ -60,10 +60,10 @@
{% endif %}
</div>
</div>
- {% if is_server_on_legacy_plan %}
+ {% if complimentary_access_plan %}
<div class="input-box billing-page-field" id="legacy-server-push-notification-notice-wrapper">
<div id="legacy-server-push-notification-notice" class="not-editable-realm-field">
- <i>This is a legacy plan that ends on {{ remote_server_legacy_plan_end_date }}.</i>
+ <i>Your complimentary access to Zulip Basic ends on {{ remote_server_legacy_plan_end_date }}.</i>
</div>
</div>
{% endif %}
@@ -74,7 +74,7 @@
{%if switch_to_monthly_at_end_of_cycle %}data-switch-to-monthly-eoc="true"{% endif %}
{%if switch_to_annual_at_end_of_cycle %}data-switch-to-annual-eoc="true"{% endif %}>
<label for="org-billing-frequency">Billing frequency</label>
- {% if downgrade_at_end_of_free_trial or downgrade_at_end_of_cycle or is_server_on_legacy_plan or fixed_price_plan or (free_trial and not charge_automatically) %}
+ {% if downgrade_at_end_of_free_trial or downgrade_at_end_of_cycle or complimentary_access_plan or fixed_price_plan or (free_trial and not charge_automatically) %}
<div class="not-editable-realm-field">
{{ billing_frequency }}
</div>
@@ -106,7 +106,7 @@
</button>
<div id="org-billing-frequency-change-error" class="alert alert-danger billing-page-error"></div>
</div>
- {% if is_server_on_legacy_plan or fixed_price_plan %}
+ {% if complimentary_access_plan or fixed_price_plan %}
{% elif automanage_licenses %}
<div class="input-box billing-page-field">
<label for="automatic-license-count" class="inline-block label-title">
@@ -258,7 +258,7 @@
This is a fixed-price plan.
{% endif %}
{% if charge_automatically %}
- {% if is_server_on_legacy_plan %}
+ {% if complimentary_access_plan %}
Your plan will automatically upgrade to {{ legacy_remote_server_next_plan_name }} on {{ remote_server_legacy_plan_end_date }}.
{% else %}
Your plan will automatically renew on <strong>{{ renewal_date }}</strong>.
@@ -352,7 +352,7 @@
<object class="loader billing-button-loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>
</button>
</div>
- {% elif is_server_on_legacy_plan %}
+ {% elif complimentary_access_plan %}
<div class="plan-toggle-action input-box billing-page-field" id="cancel-legacy-server-upgrade">
<button class="cancel-legacy-server-upgrade-button plan-toggle-action-button">
<span class="billing-button-text">Cancel upgrade</span>
@@ -373,7 +373,7 @@
<input name="status" type="hidden" value="{{ CustomerPlan.DOWNGRADE_AT_END_OF_FREE_TRIAL }}" />
{% elif downgrade_at_end_of_free_trial %}
<input name="status" type="hidden" value="{{ CustomerPlan.FREE_TRIAL }}" />
- {% elif downgrade_at_end_of_cycle or is_server_on_legacy_plan %}
+ {% elif downgrade_at_end_of_cycle or complimentary_access_plan %}
<input name="status" type="hidden" value="{{ CustomerPlan.ACTIVE }}" />
{% else %}
<input name="status" type="hidden" value="{{ CustomerPlan.DOWNGRADE_AT_END_OF_CYCLE }}" />