The TrackBilling job was being enqueued on every Stripe webhook event even with POSTHOG_ENABLED=false. handle() short-circuited via the isEnabled() check, so nothing reached PostHog, but the job still consumed queue worker cycles (20-300ms each) on accounts where Stripe fires its frequent customer.subscription.updated events. Adds the missing isEnabled() check at the dispatch site in trackPlanChange, plus the two test cases that would have caught this the first time around (TrackBilling not dispatched when enabled=false, and not dispatched when api_key is missing). Updates the listener test beforeEach to opt the suite into the enabled path so the existing assertDispatched() assertions continue to fire. |
||
|---|---|---|
| .. | ||
| Feature | ||
| fixtures | ||
| Unit | ||
| CreatesApplication.php | ||
| Pest.php | ||
| TestCase.php | ||