Removing sensitive information from comment notifications – notify_post_author
There is a hook that should let you alter that data– comment_notification_text. add_action( ‘comment_notification_text’, function($notify_message,$comment_id) { var_dump($notify_message,$comment_id); die; }, 10,2 ); You could parse that $notify_message string and remove the parts you don’t want. add_filter( ‘comment_notification_text’, function($notify_message) { $notify_message = explode(“\n”,$notify_message); foreach ($notify_message as $k => $line) { $header = trim(substr($line,0,strpos($line,’:’))); switch ($header) { case … Read more