Created
March 8, 2024 20:41
-
-
Save greenhornet79/861ee688d6b4622ee9d444c07f88cf96 to your computer and use it in GitHub Desktop.
This file contains 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_send_new_email', 'zeen_filter_send_emails', 10, 2 ); | |
function zeen_filter_send_emails( $send, $user_id ) { | |
$mode = leaky_paywall_get_current_mode(); | |
$site = leaky_paywall_get_current_site(); | |
$level_id = get_user_meta($user_id, '_issuem_leaky_paywall_' . $mode . '_level_id' . $site, true); | |
// enter the level ids where you want to stop the welcome email from sending | |
$do_not_send = array(3, 4); | |
if ( in_array( $level_id, $do_not_send ) ) { | |
return false; | |
} | |
return $send; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment