Hello,
Describe the bug
When placing a hook on transition_post_status I can see it fired but no POST data is available, to get that post data I have to use the save_post hook which is inconvenient since I don't get the $new_status and $old_status infos.
To Reproduce
- Hook into transition_post_status. Something like the following code in functions.php will do the job:
add_action( 'transition_post_status', 'log_data', 10, 3 );
function log_data( $new_status, $old_status, $post ) {
error_log(json_encode($_POST));
}
- Create a new gutenberg post and publish it
Hello,
Describe the bug
When placing a hook on transition_post_status I can see it fired but no POST data is available, to get that post data I have to use the save_post hook which is inconvenient since I don't get the $new_status and $old_status infos.
To Reproduce
add_action( 'transition_post_status', 'log_data', 10, 3 );
function log_data( $new_status, $old_status, $post ) {
error_log(json_encode($_POST));
}