id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses 46441 "[WordPress - 5.1] Can't get categories after publishing the post first time on using ""transition_post_status"" action" malayladu "When we publish the Post for the first time without doing ""Save draft"" at that time we are not getting post categories in the function which is bind to ""transition_post_status"" status hook. We are using ""get_the_category"" method to get the categories. But, every time it returns default category. It works when we do ""Save draft"" and then ""Publish"" it. I suspect it's related to WP_REST_Posts_Controller where ""wp_update_post"" method is called and we are not passing ""selected categories"" into data and in ""wp_update_post"" it overwrites post categories with default category if it's not set." defect (bug) closed normal REST API 5.0 normal duplicate needs-patch