mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
corporate: Fix 'free_trial=True` for legacy customers during upgrade.
Earlier, we were not setting `free_trial` = False for legacy customers in `do_upgrade`. This lead to a bug where customers were upgraded even before the payment was complete. 'process_initial_upgrade' was always getting called instead of 'setup_upgrade_payment_intent_and_charge'. This commit fixes the incorrect behaviour.
This commit is contained in:
committed by
Tim Abbott
parent
d3b5a76a67
commit
a764f9ce25
@@ -1736,6 +1736,9 @@ class BillingSession(ABC):
|
||||
free_trial = False
|
||||
|
||||
remote_server_legacy_plan = self.get_remote_server_legacy_plan(customer)
|
||||
if remote_server_legacy_plan is not None:
|
||||
# Free trial is not available for legacy customers.
|
||||
free_trial = False
|
||||
should_schedule_upgrade_for_legacy_remote_server = (
|
||||
remote_server_legacy_plan is not None
|
||||
and upgrade_request.remote_server_plan_start_date == "billing_cycle_end_date"
|
||||
|
||||
Reference in New Issue
Block a user