Skip to content

Commit

Permalink
Prevent cancel on grace period
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Jul 13, 2020
1 parent d82bce4 commit 5016fea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,10 @@ public function updateUrl()
*/
public function cancel()
{
if ($this->onGracePeriod()) {
return $this;
}

$nextPayment = $this->nextPayment();

$payload = $this->billable->paddleOptions([
Expand Down

0 comments on commit 5016fea

Please sign in to comment.