# Attempting to work around the 10 minute delay

**URL:** https://meta.discourse.org/t/attempting-to-work-around-the-10-minute-delay/373254
**Category:** WordPress
**Created:** [July 7, 2025, 9:36pm UTC](https://meta.discourse.org/t/attempting-to-work-around-the-10-minute-delay/373254 "2025-07-07T21:36:48Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [July 7, 2025, 10:55pm UTC](https://meta.discourse.org/t/attempting-to-work-around-the-10-minute-delay/373254/2 "2025-07-07T22:55:39Z")

</div>

Hmm I’m confused why this works, because

> [@WP Discourse comment webhook does not trigger a WP Rocket Cache refresh](https://meta.discourse.org/t/wp-discourse-comment-webhook-does-not-trigger-a-wp-rocket-cache-refresh/236700/12):
>
> The action will receive the ids of the Wordpress posts that have been updated by the webhook as an argument, i.e.
> 
> `do_action( 'wpdc_after_webhook_post_update', $post_ids );`

And your plugin

```plaintext
add_action( 'wpdc_after_webhook_post_update', function( $topic_ids ) {
    foreach ( (array)$topic_ids as $topic_id ) {
        delete_transient( 'wpdc_comment_html_' . $topic_id );
    }
}, 11 );

```

Aren’t you mixing up the (Wordpress) `$post_id`s passed to the action with the (Discourse) `topic_id` that serves as the transient key ?

I would expect your plugin to look like this

```plaintext
add_action( 'wpdc_after_webhook_post_update', function( $post_ids) {
    foreach ( (array)$post_ids as $post_id ) {
        $topic_id = get_post_meta( $post_id, 'discourse_topic_id', true );
        delete_transient( 'wpdc_comment_html_' . $topic_id );
    }
}, 11 );

```

OTOH you’re saying this works? :thinking:

---

_[View the full topic](https://meta.discourse.org/t/attempting-to-work-around-the-10-minute-delay/373254)._
