Skip to main content

benecaster_shadow_record_expiry_days

Filter Free

Filters the number of days after which shadow analytics records are considered expired and eligible for deletion by the nightly expiry cron job. Default: 90.

Shadow records are created in two scenarios: (1) Patreon Visibility Mode / scorecard — when a podcaster uploads a Patreon CSV to see their combined supporter picture without running a full migration; and (2) migration path — when the Migration Wizard uses an uploaded patron list as the foundation for a full subscriber migration. Both store patron records (including email addresses) in the migrations table under the relevant status flag.

Migration use: Increase this value if your migration window is longer than 90 days — for example, if you have a large Patreon audience that takes several months to fully migrate.

Scorecard use: The dashboard prompts for a fresh CSV upload when existing shadow records expire. Increasing this value reduces how often podcasters need to re-upload — for example, a value of 365 means an annual refresh rather than quarterly. Decrease it to purge old data sooner after migration completes.

The benecaster_shadow_records_purged action fires after each purge run and reports the count of deleted records.

Privacy note: Shadow records contain patron email addresses imported from a third-party platform (Patreon or Supercast). These are stored locally on the podcaster’s WordPress site and never transmitted to Benecaster. The 90-day default is a data-minimization default. Podcasters should disclose this data storage in their privacy policy — see Privacy Policy Considerations for guidance.

Parameters

Name Type Default Description
$days int Expiry threshold in days; default 90

Returns: int

Examples

Extend retention to 180 days

add_filter( 'benecaster_shadow_record_expiry_days', function( $days ) {
    // Retain shadow records for 180 days instead of the default 90.
    return 180;
} );

Notes

Returning a value of 0 or less is undefined behavior — the purge method will delete no records. Pair with benecaster_shadow_records_purged to monitor purge results after each run.

Affects

  • ShadowRecordExpiryCron