Stop wordpress from sending out moderation emails

I can’t offer an explanation as to why this is happening, but I can give you a quick fix to silence it.

The function responsible is wp_notify_moderator, which is a pluggable function. You can copy the contents of the function into your own plugin and modify it to return true in the case of a comment moderation email.

after the line:

$comment = get_comment($comment_id);

add:

if( empty( $comment->comment_type ) ) return true;

This may not be a long-term solution, but it’ll give inboxes a rest until it’s otherwise sorted.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)