0

I am wanting to edit the content that is sent to admins in the comment moderation email notification. I have looked at multiple places and they all seem to give roughly the same example to achieve this, but it isn't working for me.

I am adding this to my functions.php file:

add_filter('comment_notification_text', 'my_comment_notification_text', 10, 2);

function my_comment_notification_text($notify_message, $comment_id) {

  return $notify_message . ' This is some extra text that I want to add';
}

The additional text isn't being added to the notification. What am I doing wrong?

1 Answer 1

0

Try using this hook instead: comment_moderation_text. The args are the same.

1
  • That worked! Thanks very much.
    – Platoscave
    Oct 5, 2021 at 1:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.