Created
April 19, 2024 18:50
-
-
Save greenhornet79/b478bebb54fdf1077520584ef8ac4e3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('leaky_paywall_block_active_sub_to_group', 'endo_add_active_sub_to_group', 10, 2 ); | |
function endo_add_active_sub_to_group($block_active_sub_to_group, $user) { | |
$level_id = leaky_paywall_subscriber_current_level_id( $user ); | |
if ( !is_numeric( $level_id ) ) { | |
return $block_active_sub_to_group; | |
} | |
$level = get_leaky_paywall_subscription_level( $level_id ); | |
if ( $level['price'] > 0 ) { | |
return $block_active_sub_to_group; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment