Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greenhornet79/861ee688d6b4622ee9d444c07f88cf96 to your computer and use it in GitHub Desktop.
Save greenhornet79/861ee688d6b4622ee9d444c07f88cf96 to your computer and use it in GitHub Desktop.
<?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