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

This commit is contained in:
Aman Agrawal 2023-12-12 05:46:41 +00:00 committed by Tim Abbott
parent f60312b2da
commit e829e52c56
1 changed files with 5 additions and 1 deletions

View File

@ -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(