There’s a great article explaining how to hook into 2 filters for this at https://web.archive.org/web/20200216075253/http://www.sourcexpress.com/customize-wordpress-comment-notification-emails/
To send your notifications to a particular user and not the site admin, try this for a user with ID 123:
function se_comment_moderation_recipients( $emails, $comment_id ) {
$comment = get_comment( $comment_id );
$post = get_post( $comment->comment_post_ID );
$user = get_user_by( 'id', '123' );
// Return only the post author if the author can modify.
if ( user_can( $user->ID, 'edit_published_posts' ) && ! empty( $user->user_email ) ) {
$emails = array( $user->user_email );
}
return $emails;
}
add_filter( 'comment_moderation_recipients', 'se_comment_moderation_recipients', 11, 2 );
add_filter( 'comment_notification_recipients', 'se_comment_moderation_recipients', 11, 2 );
Related Posts:
- Multiple Comment Moderators and Notifications
- If new comment posted in custom post – send notification to custom email from custom field
- Disable Admin account being emailed for comment notification
- WordPress comments email notification for authors
- Capability for allowing user to post own comments without moderation
- Send Notifications to All Admins
- Why do comment moderators need to have all create/edit/delete toboth posts and pages?
- Reject Comments Based on Author Email
- Reply By Email to comment notifications
- How do I disable the discussion notification emails to us when a comment is “approved” and when an adiministrator replies?
- Sending comment notifications to different recipients depending on taxonomy terms
- Not receiving any e-mails after new comment
- Comment notification not working
- Subscribe to a post’s comments without posting a comment yourself
- Customize the new comment notifications sent to the post author after the comment is approved
- 3 moderators to approve comment
- How to auto-approve internal pingbacks?
- How can I edit the email sent when a new comment is received?
- Exclude internal links from comment moderation?
- Stop wordpress from sending out moderation emails
- how to make author to write comment on only his own posts?
- Add a drop down list to comment form?
- Prevent Contributor to show comment list
- Plugin from WordPress.com for comment notification…available? [closed]
- Add delete, approve, spam Links to Comments
- Expanding the allowed HTML tags in comments?
- Get the number of comments awaiting moderation
- How to allow a particular role like Contributor be able to only view pending comments and approve them?
- Users with custom roles can’t read each other’s comments
- Community Moderation Plugin for Comments [closed]
- Allow contributors to moderate comments comments on posts they write
- Hold comments for moderation only if user is not logged in
- Why are authors allowed to approve comments on their posts? How to revoke privilege?
- show if comment is in moderation
- Follow-up Comments Notification Without a Plug-in
- Author can only see own post comment and can moderate
- How to moderate (manually approve) comments of a specific (registered) User
- Comment Moderation and CDN Caching
- Same email for all comments
- Error While Sending Comment
- WordPress comments – how to check if comment still needs to be approved?
- Email notification to an email address other than admin for custom type post comments in wordpress
- Notify post author for a new comment on his post?
- How can the recipients and content for comment email notifications on a custom post type be changed?
- Show comments of a user post only when they are login
- comment reply by email
- Notify comment author upon reply
- Why does akismet prevent jetpack comments from appearing in my moderation queue? [closed]
- Grant a person permission to moderate all comments on a blog without giving them the ability to edit other peoples post
- How can I get list of emails of users who commented on a post?
- How Do I Allow Comment Moderation for Other User’s Posts?
- Sent comments notifications to multiple users
- Only Allow post author and “Premium” Role user to comment
- How to get Post title by locale with Qtranslate-X
- Send email messages after comment was submitted
- How to use filter on comment submission/insert
- Show image next to the comment author if have certain role
- Is there a way to only allow certain user ranks to comment on a post
- Who approved a comment, to show up in dashboard
- How to prevent users/authors from seing IP/email of new commentators?
- Can I allow registered users to comment without being logged in or having to be approved?
- Showing different images depending on user role
- Why the capability ‘activate_plugins’ is needed to allow a role to see all posts/pages/comments?
- Comment moderation
- How can I see whether a commenter has subscribed to be notified of replies / other comments to a post
- Disable comment moderation in multisite
- Listing comment author role code problem
- Comment Blacklist
- Embed a page within WordPress dashboard?
- comment awaiting moderation
- How do I comment out a block of tags in XML?
- R: Comment out block of code
- Why do I get comment spam even with Akismet and Captcha?
- What tools are available for managing/writing to WordPress? [closed]
- How to rearrange fields in comment_form()
- setting comments off as default for pages and custom post types?
- Disable email notification after change of password
- Is it possible to pull comments from facebook into your blog?
- Alert Email when any Post or Page is Changed
- Filtering the Admin Comments List to Show Only Comments from the Current User?
- Non-threaded comment replies with link to original comment
- Approve comment hook?
- Commenting in user profile page?
- Send user activation email when programmatically creating user
- How to change “You must be logged in to post a comment.”
- comment_post_ID 0 (cannot remove from dashboard)
- Disable comments on all posts/pages
- How do I delete all comments from a specific old blog post?
- Removing the “Website” Field from Comments and Replies?
- Stop WordPress redirecting comment-page-1 to the post page?
- Importing old Disqus comments into WordPress
- How to add a class to the comment submit button?
- How to wrap submit button of comment form with div
- How to enable comments for pending and draft posts?
- Using WordPress’ WYSIWYG for comments
- Enable Submit Comment Without Page Reload (Using Ajax)?
- What for is the table “wp_commentmeta” exactly?
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- Add option to disable comments on a per posts basis?
- How to disable the “Your site has updated to WordPress x.y.z” admin email?