[wp-trac] [WordPress Trac] #64217: Comment approval/type check runs after `notify_post_author` filter

WordPress Trac noreply at wordpress.org
Fri Nov 7 16:36:55 UTC 2025


#64217: Comment approval/type check runs after `notify_post_author` filter
-----------------------------+-----------------------------
 Reporter:  adamsilverstein  |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Comments         |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 The `notify_post_author` filter "Filters whether to send the post author
 new comment notification emails, overriding the site setting.". However
 the current code performs two logic checks before actually sending the
 notification. Notifications are only sent if the comment type is a note,
 or the comment is approved. notifications are not sent for unapproved
 comments, even when `notify_post_author` returns true.

 Therefore, it makes sense to move these logic checks _before_ the filter
 which would give developers core complete control over notifications.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64217>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list