This filter determines whether or not a subscription level should appear in the selection list in the [register_form] shortcode.
Parameters:
- $show (bool) - Whether or not to show the level (true or false).
- $level_id (int) - ID of the level currently being tested.
- $user_id (int) - ID of the user who's visiting the registration form (0 if not logged in).
Example:
function ag_rcp_show_subscription_level( $show, $level_id, $user_id ) { // Don't show level #1 if the current user is on level #3. if ( 1 == $level_id && 3 == rcp_get_subscription_id( $user_id ) ) { $show = false; } return $show; } add_filter( 'rcp_show_subscription_level', 'ag_rcp_show_subscription_level', 10, 3 );