I am using the
transition_post_status to process a post being published. I was getting inconsistent behaviour between two installations of WordPress, and 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.
What I need to understand is why I have 2 installations of WordPress that are seemingly doing different things when publishing a post.
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?