Skip to content

Commit

Permalink
Simplify cancelation check (#1283)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Nov 19, 2021
1 parent 4bd3b24 commit 517385e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function scopePastDue($query)
*/
public function active()
{
return (is_null($this->ends_at) || $this->onGracePeriod()) &&
return ! $this->ended() &&
$this->stripe_status !== StripeSubscription::STATUS_INCOMPLETE &&
$this->stripe_status !== StripeSubscription::STATUS_INCOMPLETE_EXPIRED &&
(! Cashier::$deactivatePastDue || $this->stripe_status !== StripeSubscription::STATUS_PAST_DUE) &&
Expand Down

0 comments on commit 517385e

Please sign in to comment.