I am new to wordpress I want to send email notifications for commenting in blogs. Currently it is going to only one user. I tried 'comment notifier' plugin but got negative result. I tried the below code
add_filter('comment_notification_recipients', 'override_comment_notice_repicient', 10, 2);
function override_comment_notice_repicient($emails, $comment_id) {
$comment = get_comment( $comment_id );
if ( empty( $comment ) )
return $emails;
$post = get_post( $comment->comment_post_ID );
return array('[email protected]');
}
but it isn't working. I googled it but couldn't get anything. Please help me solve it.