User IP being sent in notification emails

Solved4.57K viewsCore
0

Hi everyone,

I’ve been made aware of an issue with the notification emails about responses to questions on our forum.

The notification email sent to a user contained the email address and IP of the user who responded. This is definitely not the kind of information we want our users to be able to view.

Are you aware of any filters/hooks/options I can use to edit the anspress email templates?

Many thanks

Alex

selected answer
0

It’s not Anspress, it’s the core WP Comments. This can be filtered like so…

 

<?php

// The standard wp comments email contains the users IP and email address. This is a privacy issue,
// so we need to amend the contents of the email

add_filter(‘comment_notification_text’, ‘comment_notification_text_override’, 12, 2);
function comment_notification_text_override($notify_message, $comment_id){

$notify_message = <<<HERE

BUILD A NEW MESSAGE HERE!

HERE;

return $notify_message;

}

selected as best answer
You are viewing 1 out of 2 answers, click here to view all answers.