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.

stripe: Allow sponsorship pending user to upgrade to business plan.

Aman Agrawale829e52c56d3
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index 5f437c7725e..fab9125da35 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -1779,7 +1779,11 @@ class BillingSession(ABC):
) -> Tuple[Optional[str], Optional[UpgradePageContext]]:
customer = self.get_customer()
- if self.is_sponsored_or_pending(customer):
+ # Allow users to upgrade to business regardless of current sponsorship status.
+ if (
+ self.is_sponsored_or_pending(customer)
+ and initial_upgrade_request.tier != CustomerPlan.TIER_SELF_HOSTED_BUSINESS
+ ):
return f"{self.billing_session_url}/sponsorship", None
remote_server_legacy_plan_end_date = self.get_formatted_remote_server_legacy_plan_end_date(