benecaster_show_limit_exceeded
Fires during the daily license validation cycle when the active show count exceeds the plan limit and at least one show has just been automatically disabled. The newly_disabled_show_ids array contains only the delta — shows disabled in this cycle — not the full set of disabled shows.
This action does not fire on repeat cron ticks where the disabled set is unchanged (idempotent: if the same shows are still disabled on the next validation, the action is silent). It fires only when the disabled set grows.
show_limit is null on unlimited plans. On a transition from a limited plan to an unlimited plan, all previously disabled shows are re-enabled and this action does not fire (use benecaster_show_limit_recovered to observe that transition).
Which shows get disabled. The newest first. Shows are ordered by publish date descending and the first excess of them carry the disabled flag, so the oldest show on a site is the last one to be switched off. Archived shows are excluded — archiving already returns the slot.
Use cases: custom admin notices that go beyond the built-in Shows portfolio banner, external telemetry or monitoring alerts (“show X just got disabled”), add-on hooks that pause ancillary behavior (e.g. pausing Analytics Digest for disabled shows), and Slack or webhook notifications.
The payload is a delta; do not build your picture of the site out of deltas alone. An add-on that only accumulates newly_disabled_show_ids across ticks is permanently wrong the first time it misses one, with nothing to correct it. Use this action to know when to react, then call benecaster_get_over_limit_show_ids() to read the full current set.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$payload |
array |
— | Associative array with three keys: `active_show_count` (int — total published shows at the time of the check), `show_limit` (int|null — your plan's show limit; null on Studio, which is the only plan with no show limit), and `newly_disabled_show_ids` (int[] — WordPress post IDs of the shows that were just auto-disabled in this validation cycle). |
Notes
newly_disabled_show_ids is a DELTA — only what changed on this tick — and that is deliberate. A listener that needs "which of my shows are disabled right now" should not accumulate this array across firings, because a missed tick leaves its picture permanently wrong with nothing to correct it.
Read benecaster_get_over_limit_show_ids() for the full current set instead. The two answer different questions: this action tells you when something changed and what moved; the function tells you what is true now. Reading the function on any tick you care about leaves you always current, whatever you missed.
The set is small — it can never exceed the number of shows on the install — so re-reading it is cheap.
show_limit is null on an unlimited plan, not 0.
Need this built rather than just documented? See our services →