benecaster_tier_map_updated
Fires after a batch of tier mappings is saved for a show from the Tier Mapping section of the show’s Subscription settings, on the board or in list view (both save through PUT /benecaster/v1/bridge/tier-map). The $count parameter is the number of mapping rows actually written. A row is one membership-plugin level, so two levels mapped onto one tier are two rows. Rows for levels set to “No access” are deleted and not counted.
It does not fire for the Bridge Switch Wizard, which saves its mappings as part of the switch: listen to benecaster_bridge_switched for that. It never fires for a show on built-in membership, which has no tier mapping.
Use this hook to flush derived caches, re-check feed access for subscribers at affected tiers, or send a notification when the mapping changes.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$show_id |
int |
— | ID of the show |
$bridge_slug |
string |
— | Slug of the active bridge |
$count |
int |
— | Number of mapping rows written in this batch, one per level |
Examples
Flush feed cache after mapping change
add_action( 'benecaster_tier_map_updated', function ( int $show_id, string $bridge_slug, int $count ): void {
do_action( 'benecaster_flush_feed_cache', $show_id );
}, 10, 3 );
Need this built rather than just documented? See our services →