benecaster_subscriber_engagement_threshold
Filters the number of days without a feed poll before a subscriber is considered inactive for a given show. When a token’s last feed access falls outside this window, benecaster_subscriber_feed_inactive fires and the subscriber’s engagement status transitions to 'at_risk'. This filter fires once per show during the daily engagement cron scan, allowing different thresholds on the same site.
The base value is 30 days. Returning a per-show override avoids false positives on lower-frequency shows — a monthly show has a naturally longer listening cadence than a weekly one. Practical baselines: weekly show → 30 days; bi-weekly → 45 days; monthly → 60–75 days.
Subscribers whose token has never been accessed are excluded from threshold evaluation entirely. They are a different cohort with their own hook — benecaster_subscriber_never_accessed — because “lapsed” and “never started” call for different handling.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$days |
int |
— | Inactivity threshold in days. Default `30`; **minimum 30** — lower values have no effect. |
$show_id |
int |
— | ID of the show |
Returns:
int
Examples
Extended threshold for monthly show
add_filter( 'benecaster_subscriber_engagement_threshold', function( $days, $show_id ) {
// Give monthly shows a 90-day inactivity window instead of the default 30.
$frequency = get_post_meta( $show_id, '_show_release_frequency', true );
if ( 'monthly' === $frequency ) {
return 90;
}
return $days;
}, 10, 2 );
Per-show threshold stored in post meta
add_filter( 'benecaster_subscriber_engagement_threshold', function ( int $days, int $show_id ): int {
$custom = (int) get_post_meta( $show_id, '_my_addon_engagement_threshold', true );
return $custom > 0 ? $custom : $days;
}, 10, 2 );
Notes
Subscribers whose token has never been accessed (last_accessed_at IS NULL) are excluded from threshold evaluation — they are not flagged as at_risk by this filter. These subscribers permanently show engagement_status = 'active' under the current model, which means they are indistinguishable from genuinely active subscribers and are not counted toward inactivity metrics. This is a known gap: a subscriber who signed up but never polled their feed (i.e., never set up their podcast app) is a meaningful re-engagement target but currently invisible in the engagement layer. A dedicated never_accessed engagement status with its own grace period and companion action hook is tracked in the plugin roadmap as a future enhancement. Tokens that cross the inactivity threshold transition engagement_status from 'active' to 'at_risk' and fire benecaster_subscriber_feed_inactive.
Need this built rather than just documented? See our services →