I wanted to set the new plan to the subscription (before payment). And I have just noticed that when I wanted to syncPlan with $syncInvoicing = true for saving the new payment period I have noticed that with these lines:
// Set new start and end date
$period = new Period($plan->invoice_interval, $plan->invoice_period);
$this->starts_at = $period->getStartDate();
$this->ends_at = $period->getEndDate();
the subscription actually gets renewed. IMHO I would keep changing plan and the renewal separate. So syncPlan and changePlan should not automatically renew the sub, or do it optionally with an argument.
I wanted to set the new plan to the subscription (before payment). And I have just noticed that when I wanted to
syncPlan
with$syncInvoicing = true
for saving the new payment period I have noticed that with these lines:the subscription actually gets renewed. IMHO I would keep changing plan and the renewal separate. So
syncPlan
andchangePlan
should not automatically renew the sub, or do it optionally with an argument.