Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stripe: Use `next_plan` instead of `new_plan` for legacy upgrades.
Aman Agrawale44f3d448d1f
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.pyindex 3bd863140b0..33b494d5cfb 100644--- a/corporate/lib/stripe.py+++ b/corporate/lib/stripe.py@@ -829,7 +829,7 @@ class BillingSession(ABC):assert plan.end_date is not Nonereturn plan.end_date.strftime("%B %d, %Y")- def get_legacy_remote_server_new_plan_name(+ def get_legacy_remote_server_next_plan_name(self, customer: Customer) -> Optional[str]: # nocoveragelegacy_plan = self.get_remote_server_legacy_plan(@@ -1671,7 +1671,7 @@ class BillingSession(ABC):remote_server_legacy_plan_end_date = self.get_formatted_remote_server_legacy_plan_end_date(customer, status=CustomerPlan.SWITCH_PLAN_TIER_AT_PLAN_END)- legacy_remote_server_new_plan_name = self.get_legacy_remote_server_new_plan_name(customer)+ legacy_remote_server_next_plan_name = self.get_legacy_remote_server_next_plan_name(customer)is_self_hosted_billing = not isinstance(self, RealmBillingSession)context = {"plan_name": plan.name,@@ -1702,7 +1702,7 @@ class BillingSession(ABC):"is_self_hosted_billing": is_self_hosted_billing,"is_server_on_legacy_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_new_plan_name": legacy_remote_server_new_plan_name,+ "legacy_remote_server_next_plan_name": legacy_remote_server_next_plan_name,"using_min_licenses_for_plan": using_min_licenses_for_plan,}return contextdiff --git a/corporate/views/billing_page.py b/corporate/views/billing_page.pyindex 37b80ef662f..272645801c6 100644--- a/corporate/views/billing_page.py+++ b/corporate/views/billing_page.py@@ -172,7 +172,7 @@ def remote_server_billing_page(customer is Noneor get_current_plan_by_customer(customer) is Noneor (- billing_session.get_legacy_remote_server_new_plan_name(customer) is None+ billing_session.get_legacy_remote_server_next_plan_name(customer) is Noneand billing_session.remote_server.plan_type == RemoteZulipServer.PLAN_TYPE_SELF_HOSTED)):diff --git a/templates/corporate/billing.html b/templates/corporate/billing.htmlindex a9b4b272f41..0de35a9bc54 100644--- a/templates/corporate/billing.html+++ b/templates/corporate/billing.html@@ -180,7 +180,7 @@{% else %}{% if charge_automatically %}{% if is_server_on_legacy_plan %}- Your plan will automatically upgrade to {{ legacy_remote_server_new_plan_name }} on {{ remote_server_legacy_plan_end_date }}.+ 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>.{% endif %}