• Resolved batman42ca

    (@batman42ca)


    Does this plugin use it’s own code to notify the admin that a new user has registered or does it call the WordPress functions? I installed a plugin that blocks new user registration emails from being sent to the admin when I use the WordPress registration page, but it doesn’t block new user notifications when I register using this plugin.

    http://wordpress.org/plugins/profile-builder/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Cristian Antohe

    (@sareiodata)

    Hi,

    Unfortunately there is no easy way of doing that. Can you tell me what plugin you’re using to suppress new user notifications for admins? I’ll want to have a look to see if there some simpler way of doing it.

    Thread Starter batman42ca

    (@batman42ca)

    Is there not a single line in your code somewhere that makes a function call to send the email? Can’t I just comment that out? (although it would be great if that were configurable)

    The plugin I’m using to suppress new user email notifications to the admin is this one:

    disable-new-user-notifications

    Plugin Author Cristian Antohe

    (@sareiodata)

    Yes there is. Open wppb.register.php and search for

    $sentEmailStatus = wppb_notify_user_registration_email

    Comment that line out and you won’t get notifications.

    Remember that future updates will overwrite your current files, that’s why I didn’t suggest this initially.

    Thread Starter batman42ca

    (@batman42ca)

    Thanks, that helps for now, but I’m surprised the “disable-new-user-notification” plugin didn’t suppress that email since it worked on WordPress registration form.

    The line of code you quoted appears in two places. Once within “wppb_activate_signup()” and a second time in “wppb_front_end_register()” with this comment:

    // send an email to the admin, and – if selected – to the user also.

    If I comment out these lines, will the user no longer receive their email? I only want to suppress the admin email. Would I be better off commenting out something within wppb_notify_user_registration_email() which I assume is one of your functions?

    Plugin Author Cristian Antohe

    (@sareiodata)

    Yeah, you could do that as well.

    Search wppb_mail(get_option(‘admin_email’) inside /function/email.confirmation.php file and comment that one out.

    Thread Starter batman42ca

    (@batman42ca)

    First, let me say you are being very helpful and I appreciate it. Thank you.

    Just above the line you mentioned is this:

    if (trim($registerFilterArray['adminMessageOnRegistration']) != '')

    Is there some way I can cause

    $registerFilterArray['adminMessageOnRegistration'] = ''

    … without editing the code? Since you have that if statement there, what could cause the admin message to be blank and the email not to be sent?

    Plugin Author Cristian Antohe

    (@sareiodata)

    You’re right. That would work. 🙂

    try something like this

    add_filter ( 'wppb_register_admin_message_content', 'wppb_delete_admin_email_message', 10, 5 );
    
    function wppb_delete_admin_email_message(){
        return '';
    }

    See if that works. (I haven’t tested it. )

    Thread Starter batman42ca

    (@batman42ca)

    Yes, that works fine. I’m glad we found a way to do this without modifying the code.

    Thank you very much for all your patient help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Disable new user notification to admin?’ is closed to new replies.