Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have An administrator must always approve the comment checked, as well as Email me whenever Anyone posts a comment.

This sends an email to the post author. I don't want that. I have one person in charge of comments on my site, and I want that one person to be receiving all those emails.

Any way to accomplish that?

share|improve this question

1 Answer 1

Just change to to address for these emails.

Sample code, not tested:

// hook in late, to avoid side effects.
add_filter( 'comment_notification_headers', 'wpse_73855__change_comment_notify_to' );

function wpse_73855__change_comment_notify_to( $input )
{
    if ( 'comment_notification_headers' === current_filter() )
    {
        add_filter( 'wp_mail', __FUNCTION__ );
        return $input;
    }

    $input['to'] = get_option( 'admin_email' );
    remove_filter( current_filter(), __FUNCTION__ );
    return $input;
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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