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.
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
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.
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?
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.
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?
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. )
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.