How to edit post meta data before publishing the post it self wordpress?
You can use save_post action which gets triggered when a post is created or updated. https://developer.wordpress.org/reference/hooks/save_post/ In your function, you will have to check for your custom post type, set the value you would like to have to a variable, and pass it to the update_post_meta function with giving the name of your custom field. … Read more