Is there an action i can hook into when a post is set from published back to draft? I have tried both transition_post_status
and publish_to_draft
but they don't seem to work when I set the post back to draft. I am doing something like:
add_action('publish_to_draft', 'doStuff')
function doStuff() {
// do stuff here
}
Maybe there is something I am missing, but I wanted to check that these are the correct hooks to use.