# Discrepancies in webhook topic\_posts\_count

**URL:** https://meta.discourse.org/t/discrepancies-in-webhook-topic-posts-count/292741
**Category:** Bug
**Created:** [January 24, 2024, 9:02am UTC](https://meta.discourse.org/t/discrepancies-in-webhook-topic-posts-count/292741 "2024-01-24T09:02:22Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [November 20, 2024, 4:27pm UTC](https://meta.discourse.org/t/discrepancies-in-webhook-topic-posts-count/292741/2 "2024-11-20T16:27:06Z")

</div>

I came across this when looking into this issue:

> [@Should comments webhook update count after deleting posts/comments?](https://meta.discourse.org/t/should-comments-webhook-update-count-after-deleting-posts-comments/336621):
>
> I’m using DC SSO where users are managed by WP. The forum acts as a way to comment on posts, but these posts are only visible in the forum. I have a custom “Comment” button in WP that turns into “x comments” when there are coments in the linked topic. (It uses normal WP get\_comments\_number that the DC plugin hooks into.) It works well, but I’ve just tried deleting a post and the count remains the same. The UI in the WP plugin recommends: Events: "Post is created", "Post is updated". Based on…

I’ve made a PR which fixes it:

[https://github.com/discourse/discourse/pull/29853](https://github.com/discourse/discourse/pull/29853)

---

_[View the full topic](https://meta.discourse.org/t/discrepancies-in-webhook-topic-posts-count/292741)._
