[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:44:34 UTC 2025
#64217: Comment approval/type check runs after `notify_post_author` filter
-----------------------------+------------------------------
Reporter: adamsilverstein | Owner: adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 7.0
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+------------------------------
Description changed by adamsilverstein:
Old description:
> 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.
New description:
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 after the filter - 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#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list