Let buy-up holders through a tier gate
min_tier expresses exactly one condition: “at or above this tier”. Anything else — a buy-up, a WordPress role, a date — goes through benecaster_tier_gate_passes, which fires before either branch is rendered, so whichever branch you choose is still the only one that runs.
The filter fires for every gate on the site, so scope it: check $show_id and $min_tier and return $passes untouched for gates you don’t mean to change.
Do not put the buy-up’s token_type in min_tier instead. benecaster_get_user_tier_for_show() returns only a subscriber’s base tier slug, so a buy-up slug matches no tier: the gate would stay shut for every buy-up holder and fail closed without any error.
Website only. This filter does not fire when the RSS feed resolves a gate — feeds are compiled and cached per tier, not per subscriber, so a gate inside an episode’s Full Page Content gives buy-up holders its else branch in their podcast app even though this snippet opens it on the episode page.
Code
<?php
add_filter(
'benecaster_tier_gate_passes',
function ( bool $passes, int $show_id, string $min_tier, string $user_tier ): bool {
// Already in on tier, or not a gate this snippet is about.
if ( $passes || 'growth' !== $min_tier ) {
return $passes;
}
// The buy-up's row ID in benecaster_buyups (here, "Transcripts").
$transcripts_buyup_id = 12;
// 0 = the current user. Passing $show_id scopes the grant to the
// show the gate is on, so a buy-up bought on another show can't open it.
return benecaster_user_has_buyup( 0, $transcripts_buyup_id, $show_id );
},
10,
4
);