Skip Navigation

[Resolved] Hook transition_post_status Seems Not to be Called When Only Toolset Meta Change

This support ticket is created 2 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by tenseg 2 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#2245613

I am trying to:
Our sites all run on a server managed by SpinupWP where page caches are purged upon updating a post with the

transition_post_status

hook. We've noticed that when updating a post whose sole change is to change a meta managed by Toolset that the page cache is not purged, leading us to believe that in such a circumstance Toolset is somehow changing how the post is updated, and not calling the

transition_post_status

hook at all. This is a hook meant to run even when posts are updated but their status is not being changed. It is a hook we'd expect would run even if only Toolset meta was updated in a post.

I expected to see:
That the updating of a post even with just Toolset meta changing would still result in the calling of the

transition_post_status

hook.

Instead, I got:
Based on the fact that the page cache was not purged, I believe that the

transition_post_status

hook was never called in such a post update where only Toolset meta changed.

Question:
Is this correct behavior, to not call the

transition_post_status

hook, meaning that we need to write a bridge plugin to purge the page cache based on a hook in Toolset itself? If so, what hook in Toolset would you recommend? Or is this a bug, that the

transition_post_status

hook is not getting called?

#2245957

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

We have another way that why dont you use the save_post hook that should be fired every time the post gets saved/updated.

Here is the Doc:
=> https://toolset.com/documentation/customizing-sites-using-php/updating-types-fields-using-php/

You should try to adjust the code within the save_post hook as required and I think thats be best hook to use as save_post hook should be fired every time you save/update the post from backend.

#2246259

I am not the author of the caching plugin I use, so will need to take this suggestion up with them. Thanks for your response.