WP Rocket: Clear cache on update of Global Block

Hello, I need to clear the cache on update of global block located here: snowwatch.org/status (Summary).

I am getting support from WP Rocket but they cannot find any documentation on hook that triggers when updating the global block. Here’s what they said:

I cannot find any public information about this editor.
Can you please check with the theme developer and ask them if they have a public doc on their hooks?

We are searching for a hook that triggers after a post has been added, deleted, or edited using the theme builder.

We need to hook a WP Rocket post/page cache clear after it has been edited so the cache gets updated and everything runs smoothly.

Can you help?

Hi Daniel,

Thanks for reaching out.

You can try the save_post hook, all post types and post meta are on that route upon saving or you can use get_post_type() == 'cs_global_block' within save_post to make sure it’s only applied to that specific post type. Just tell the WP Rocket support about it.

Hope that helps.

Thank you.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.