How to disable send e-mail notification new comments for some posts
You can use notify_moderator and notify_post_author filters to control whether or not the comment notification should be sent – to the moderator or comment author. add_filter(‘notify_moderator’, ‘prefix_filter_sent_comment_notification’, 10, 2); add_filter(‘notify_post_author’, ‘prefix_filter_sent_comment_notification’, 10, 2); function prefix_filter_sent_comment_notification( bool $maybe_notify, int $comment_ID ) { $comment = get_comment($comment_ID); $comment_post = get_post($comment->comment_post_ID); // determine, if notification should sent or not … Read more