Skip to main content

benecaster_bridge_new_levels_detected

Action Premium

Fires when the tier mapping screen detects at least one membership level whose ID has not been seen before. This occurs when a new membership level is added in the connected plugin after initial setup, or when a new bridge is installed and its levels are read for the first time.

The built-in admin notice system reacts to this action automatically, publishing a warning notice for each new level detected. Callbacks added with this hook provide supplementary behavior — they do not replace or suppress the built-in notice. To retrieve the list of specific new levels, query the bridge levels endpoint from your callback; the individual new-level detail is not passed as a parameter.

Parameters

Name Type Default Description
$show_id int ID of the show
$bridge_slug string Slug of the bridge whose levels were checked (e.g. 'memberpress', 'pmpro')

Examples

Send a Slack alert on new levels

add_action( 'benecaster_bridge_new_levels_detected', function ( int $show_id, string $bridge_slug ): void {
    my_plugin_notify_slack(
        "New {$bridge_slug} levels detected for show {$show_id} — check tier mapping."
    );
}, 10, 2 );

Notes

The seen-set is stored in the post meta key _benecaster_seen_levels_{bridge_slug} and is updated on each PUT /bridge/tier-map save. The action fires whenever the admin opens the tier mapping screen after new levels have been added without a subsequent mapping save.

Need this built rather than just documented? See our services →