wp_insert_post($post), add an array of values with update_post_meta
I would suggest turning on error debugging. It will likely show you some PHP errors in the above code. It appears that in the meta_input array you’re calling things like update_post_meta() before the post even exists. In those functions you’re calling the $post_id variable and that also doesn’t appear to exist. On top of that, … Read more