admin – transition_post_status hook not running, edit.php AJAX call not running
I am using the
transition_post_status to process a post being published. However, on one of my test installations, this is not being called the same as another installation. I have tracked this down to the AJAX calls being made from the post compose page itself.
These are the requests being made when I transition a post from a draft to published on my two installations:
As you can see, the AJAX call to post.php is not being made in the second example. It turns out that the global
$post object is in a different state inside
transition_post_status hook when being called via post.php, which is why my code only works on the first installation.
Both installations are running 5.7.2, and are stock aside from the 1 plugin that I am working on, which is the same on both installations.
Can anyone shed any light on why two different installations are triggering different AJAX calls when publishing a post?