Not sure it is the specific issue that causes it, but what you are doing wrong is to assume the existence of global variable, in this case $_POST['post_title']. Not everything that updates posts will have it set.
The right way to do what you are trying to do is to hook your hook on higher priority and get the relevant information from the wordpress DB itself by either using the second variable passed to the hook, or by doing a $post = get_post($post_id) and replace $_POST['post_title'] with $post->post_title
Related Posts:
- trigger save_post event programmatically
- Wp_update_post: Infinite loop even with remove_action solution, OOP
- Is it possible to save/modify a post without calling the “save_post” action hook?
- Returning ACF custom field from publish_post
- How to check what kind of saving it is?
- How to catch and modify custom field values when a page is updated
- Conditional for autosave or auto draft?
- ‘save_post’ hook not working in WP 3.5
- Add action save post when create and publish
- remove_action(‘save_post’) in function that was triggered by save post not working
- set_post_format called after wp_update_post when using bulk edit?
- WordPress save_post hook not firing when checking if _GET[‘post’] is set
- How do I set a custom post type Category after import using wp_set_post_terms
- Show admin notice if metabox field is empty during save post
- update ACF field when saving post on back office
- Where can I find a list of WordPress hooks?
- Whats worth using add_action when we can simply use add_filter?
- Hook on trash post
- Adding onload to body
- What is the earliest possible hook for safely using `is_front_page`?
- Send data to 3rd party api with wp_remote_post on wp_login
- Hide gutenberg option blocks
- admin_post hook not called
- deactivated_plugin hook: get the name of the plugin
- Is there a hook for user activation (after they click the email confirm)?
- Setcookie works on admin but not front end
- Bulk action hook for admin pages which uses WP_List_Table
- WP Admin Bar frontend issue with dashicon deregister
- A good way to add a different background image for each page?
- Searching a hook which triggers when deleting a post to get all comments
- add_action for lost_password or modify wp-login.php?action=lostpassword
- Add my own function to existing WooCommerce hook
- Firing a function AFTER redirect
- How can I customize the upload error message in WordPress?
- WordPress hook that gets featured image from direct URL?
- Why is save_post hook being called twice despite all my efforts?
- What’s hook to use immediately after a user is authentcated [duplicate]
- Hook before posting via JSON REST API
- add_action for unknown custom post types
- How to prevent double execution of do_action statements
- When is the {$new_status}_{$post->post_type} transition hook fired?
- TinyMCE as comment editor – encoding issues
- Hook to change Logout url
- How to exclude a list of specific category in category widget in new post admin screen?
- Method to find a hook
- Understanding WP
- Get post or page id early
- Looking for a hook for post.php
- Executing Arbitrary Code at a Specific URL without Creating a Post or Page?
- customize_controls_enqueue_scripts doesn’t fire from within my plugin
- Save User Meta Email Address in Lowercase
- When are wp redirect methods safe to hook?
- Execute JavaScript in WordPress Hook
- How to cancel the trash action inside wp_trash_post
- wp_insert_post_data hook should be called before updating db but isn’t
- Displaying list of cities according to the selected state. Using the WordPress hook
- Would there be anything stopping me from removing both wp_head and wp_footer?
- Where Are Hooks?
- WordPress wp_loaded action hook
- Check if `do_action()` in WordPress returns any result
- Defining hooks within (php)classes?
- Divi hook not working [closed]
- Add WordPress hook outside of Plugin or Theme
- How to perform action when plugin/theme editor is used?
- What is the proper hook to use for recording a post view?
- How to load this code on function.php
- Woocommerce single_product_summary hook not working
- Where is publish_post hook fired?
- A good hook to check authorization and redirect?
- Bloginfo hook – can it be more precise?
- Custom posts and get_post_meta in {$post_status}_{$post_type}
- Print on screen during shutdown hook – error during saving in theme-editor.php
- How to stop execution of a function via add_action hook?
- changing genesis_before_while in new theme framework
- Moving Javascript from footer to header
- Adding a new hidden field based on a condition in Ninja Forms
- Forcing WooCommerce customers to create account before checking out
- Store user ID on wp_term_taxonomy when new term inserted
- ‘user_register’ hook – need to distinguish if created from wp admin panel
- Make multiple URLs behave as home page
- Issue migrating a checkbox-type meta field to the block editor
- Transition_Post_Status hook not working properly
- Wodpress XML Import hooks
- profile_update hook does not fire from front-end
- wp_update_post not getting triggered by hook
- How to get user profile information before update?
- Why is pre_get_posts hook invoked multiple times?
- Undefined fieldId in gform.addFilter for limiting dates in datepicker – Gravity Forms
- Get First Post content and edit it using pre_get_posts (or similar?!)
- Are there Hooks for featured image popup?
- WordPress sending data with add_action
- How to hide / remove attachment “alt” or “caption” field in Admin?
- Why does get_post() not return anything?
- Access post meta just after publishing
- Which hook runs first(init,… or ???) [duplicate]
- Which hook should I use for this scenario regarding the registration process and account/profile update?
- Redirect back to origin page after using get_delete_post_link()
- Is there any Reference of WordPress hook and hacks? [closed]
- Thesis Theme -> hooks not working for custom function
- Can I display text that’s generated by a hook in another place in the HTML?