stripe: Use `next_plan` instead of `new_plan` for legacy upgrades.

This commit is contained in:
Aman Agrawal 2023-12-09 08:00:34 +00:00 committed by Tim Abbott
parent 5d3eafcdd4
commit e44f3d448d
3 changed files with 5 additions and 5 deletions

View File

@ -829,7 +829,7 @@ class BillingSession(ABC):
assert plan.end_date is not None
return 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]: # nocoverage
legacy_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 context

View File

@ -172,7 +172,7 @@ def remote_server_billing_page(
customer is None
or get_current_plan_by_customer(customer) is None
or (
billing_session.get_legacy_remote_server_new_plan_name(customer) is None
billing_session.get_legacy_remote_server_next_plan_name(customer) is None
and billing_session.remote_server.plan_type == RemoteZulipServer.PLAN_TYPE_SELF_HOSTED
)
):

View File

@ -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 %}