wp_after_insert_post WordPress Action Hook
The wp_after_insert_post hook is called after a new post has been inserted into the database. It can be used to perform any actions that need to be done after a new post has been created.
do_action( 'wp_after_insert_post', int $post_id , WP_Post $post , bool $update , null|WP_Post $post_before ) #
Fires once a post, its terms and meta data has been saved.