## Problem The Discord **Plan changed** notification only showed the *new* plan value in the `Changed` field, so it was impossible to tell what actually changed: ``` Changed Plan: €3.99 / month ``` Was it a price change? An interval change? From which plan? No way to know. ## Fix Compute the previous plan from Stripe's `previous_attributes` and render it as `old → new`, matching the existing status-change behaviour: ``` Changed Plan: €9.99 / month → €3.99 / month ``` `planLabel()` was generalised to read both the modern `items.data[].price` shape and the legacy top-level `plan` shape Stripe still includes in the diff, so the same helper works on both the current object and the `previous_attributes` diff. Falls back to the old `Plan: X` output when no previous value is detectable. ## Test Added a feature test asserting the `old → new` output for a `customer.subscription.updated` plan change. All 11 tests in the file pass. |
||
|---|---|---|
| .. | ||
| .pest | ||
| Browser | ||
| Feature | ||
| Performance | ||
| Support | ||
| Unit | ||
| Pest.php | ||
| TestCase.php | ||
| bootstrap.php | ||