Changing post content on save, using updated fields
Try to use the post object provided by the action as the second parameter instead of getting it from database: function change_event_slug_on_save( $post_id, $post ) { … } add_action( ‘save_post’, ‘change_event_slug_on_save’, 10, 2 ); With this you can remove the line $post = get_post($post_id); EDIT: Tribe Events Calendar has it’s own actions for saving an … Read more