Skip to content

Commit c84c74a

Browse files
authored
Fix ends_at when cancelling paused subscriptions (#102)
1 parent 0a000ae commit c84c74a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Subscription.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,9 @@ public function cancel()
603603
}
604604

605605
if ($this->onPausedGracePeriod() || $this->paused()) {
606-
$endsAt = $this->paused_from;
606+
$endsAt = $this->paused_from->isFuture()
607+
? $this->paused_from
608+
: Carbon::now();
607609
} else {
608610
$endsAt = $this->onTrial()
609611
? $this->trial_ends_at

0 commit comments

Comments
 (0)