[wp-trac] [WordPress Trac] #55309: Incorrect post comment count after deleting comment with replies
WordPress Trac
noreply at wordpress.org
Thu Mar 3 17:50:55 UTC 2022
#55309: Incorrect post comment count after deleting comment with replies
--------------------------+------------------------------
Reporter: jwz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 5.9.1
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses:
--------------------------+------------------------------
Changes (by davidbaumwald):
* keywords: => dev-feedback
Comment:
@jwz I'm going to tag this for `dev-feedback` to see if a conversation can
be sparked to determine _if_ this should be done. I agree, it seems
reasonable since those comments are no longer visible.
In the interim, you could always filter the number of comments for each
post when the count is updated by using the
[https://developer.wordpress.org/reference/hooks/pre_wp_update_comment_count_now/
pre_wp_update_comment_count_now] hook and checking the parent comment of
each child comment's status.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55309#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list