Skip to content

Commit

Permalink
Clear the generic trial upon subscription creation (#1628)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Jan 6, 2024
1 parent 94b5e96 commit 735ca3c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Http/Controllers/WebhookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ protected function handleCustomerSubscriptionCreated(array $payload)
]);
}
}

// Terminate the billable's generic trial if it exists...
if (! is_null($user->trial_ends_at)) {
$user->update(['trial_ends_at' => null]);
}
}

return $this->successMethod();
Expand Down

0 comments on commit 735ca3c

Please sign in to comment.