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 'E-mail':
case 'URL' :
case 'Whois':
unset($notify_message[$k]);
break;
case 'Author' :
$pat="([^(]+)\(.*$";
$notify_message[$k] = trim(preg_replace('|'.$pat.'|','$1',$line));
break;
}
}
$notify_message = implode("\n",$notify_message);
return $notify_message;
}
);
I think that accomplishes what you were going for.