Adding function to hooks is runtime operation, it is not persistent. Whatever hook operation you run in Ajax actions – they are performed in separate WP instance and expire as soon as Ajax response is returned. They have no influence on currently loaded page.
You probably need to hook your functionality to save_post
as usual (not in Ajax action) and check for your additional metabox to handle it.
Related Posts:
- prevent post submission
- Passing error/warning messages from a meta box to “admin_notices”
- Metabox with checkbox is not updating
- Access the environment of an admin page from another admin page
- Why is `add_meta_box` not working?
- Save checkboxes of a metabox with a foreach loop (invalid argument)
- Metabox of one post influence setting on other
- remove_meta_box for all post types doesn’t seem to work
- Custom Metabox with Ajax in Edit Post – Stuck
- unable to save post meta on single field with multiple selects
- Undefined ‘post_type’ error on Add new page
- Metabox saves on Update or Publish, but not on Saving Draft
- save_post action to include wp_insert_post_data filter, gathering meta field info & prevent infinite loop
- Meta box html is not updating after saving
- Getting gutenberg (WordPress 5) to save TInymce data?
- How to prevent further updates of custom meta when using actions to set one meta based on another
- Stop saving process when metabox is invalid [duplicate]
- Add custom action in post type
- How to position user meta data field
- How to create a button click counter meta box?
- Why does not my metabox save?
- What do the numbers mean at the end of add_action(‘save_post’)…?
- Migrating from metaboxes to wp_editor()
- save_post_{$post->post_type} action firing on second save
- Save meta data with post, Without using any plugin [closed]
- Remove meta box except on category pages
- Editor meta box Showing but not saving
- Custom loop attached to link
- save radio button selection in post-meta on submit
- Post and Pages section inside WordPress admin are completely blank
- Saving multiple fields (dropdown and text) in custom metabox
- Meta Box – Javascript Datatable
- A correct hook for saving meta boxes data
- Reload meta box content with AJAX
- Metaboxes not saving data
- Custom carousel with meta box data
- Display multiple “save draft button” on a post edit
- save_post action not firing when save
- add_post_meta Adds post meta but the value is blank
- Serialization problem after auto-update
- Selecting a dynamic sidebar via metabox in wordpress
- show title if one of post meta exist
- Query a Custom Post Type to another CPT via Metabox
- Add additional metafields based on value of select box
- Best practices for meta box placement?
- Custom-Metaboxes-and-Fields text_url field prepending http://
- Custom metabox for file upload return empty filename
- How to show metabox key to custom post?
- Video slideshow
- Echo order box (in pages)
- Issues with Saving Dynamic Metabox
- when saveing $meta_box i get Undefined index error
- WP Alchemy – stripping my paragraph tags from textarea metaboxes
- Adding a Custom ‘Now’ button under ‘Published on’ header to return current date and time
- Updating post meta and Meta Box plugin
- Adding meta boxes to custom post type
- Meta Box Value not saving / populating?
- Related posts and custom meta_box?
- Customer portal (posts as checklist)
- How to set default screen options?
- save post running twice and creating two database entries – how do I disable this?
- header specific meta box result detect url
- Select Options Meta Data is Not Updating in Edit Meta Box
- Meta boxes not showing on custom post type. Blank page?
- Problem with executing a function on saving a post
- Meta boxes not showing up
- Option to delete value in metabox
- Tags meta box don’t show when creating a new post type
- dynamically get post attachment while editing
- added a meta box to post however when saving menu while debug on throws a warning
- where does my function output from load-* go?
- Meta Boxes causing Header errors
- why esc_url not working in smartmetabox
- Remove duplicated values from meta box values
- Custom metabox with App Store / Google Play links
- Return $post_id when DOING_AUTOSAVE?
- Change Default Custom Fields Metabox Name on cctm plugin
- How to create metabox that can be queried in the database?
- Form submit from modal window to parent window
- How to display meta box data using “Meta boxes as needed”
- Attaching a metabox to a single post
- Setting Event to Expire Using Custom Metabox
- Metabox doesn’t retain values
- Drop down menu’s not saving using Custom Meta Boxs in WordPress
- How do I create a Meta box that can be repeated? (with an image section and text area)
- Remove Title, Editor and Meta Box Support Based on Post Formats
- Custom select box meta field
- Metadata in loops
- Static var overwritten with WP AJAX action, works fine without AJAX
- Saving an upload media meta box field
- Allow iframe in custom meta box
- Calling Data from Custom Meta Box
- How can i remove blank area caused by theme’s post meta boxes?
- How do I allow Authors and Contributors to use the metabox
- CSS styling not working in a custom metabox
- Need help, Passing variables with get_post_meta
- Remove action of an external plugin after checking if custom post meta is set
- Input select option Change Content in Metabox
- send meta box input data without publish button
- Datepicker altField and altFormat to save a new meta key/value in a post?