Try changing your content and saving again. This will trigger the action. save_post
is only called if the content has changed.
To come in before this is checked, you can use the pre_post_update
hook.
add_action( 'pre_post_update', 'saving_metabox' );
function saving_metabox( $post_id ) {
die('test');
}
Related Posts:
- Bug: Post needs to be updated twice when adding action for save_post hook
- Which hook should be used to add an action containing a redirect?
- Add a new tab to WordPress Plugin install Listing
- Changing Plugin Load Order
- How should you hook a session_start() when authoring a plugin?
- Init action hook running late after PayPal’s return url?
- Is there widely accepted phpDoc syntax for documenting which hook calls a function?
- How Do I Load My Action Earlier Enough?
- What’s the earliest point I can get the queried object ID?
- How do I Make a Theme “plugin-ready”?
- WordPress scheduled task is called but not executed
- A Post is saved twice or more during add_action(save_post)
- How to modify post content before writing to database?
- I can’t find where a hook is being defined in a plugin – Easy Digital Downloads
- How do I handle multiple Submit buttons in plugin’s option page?
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- Plugin development, hooks, generate content
- Is it possible to create an action hook using do_action() within add_action()?
- Hook for post permalink update
- Dynamically Override Fancy Title
- Hook event for upload image in the menu
- Help with callback using do_action_ref_array
- Create a plugin to change the action to which a function is hooked
- Adding Automatically To In WordPress Using Filter Referencing?
- comment_email hook doesn’t seem to work for comment editor field
- Best Practices for Creating and Handling Forms with Plugins?
- Is there a better way to implement responsive images than what WordPress uses by default?
- Woocommerce – Hide a Column in Cart Table
- Add tab to profile.php wordpress plugin development
- Placement of Code in Plugin for hooking `save_post`
- How do I change the initial quantity of a product in woocommerce?
- How to delete an user including data from custom database tables
- Which are the hooks run before/after when a category’s deletion?
- Should action callbacks start with a verb?
- Why is my javascript not invoked in my hooks except wp_head?
- Namespaced action and filter tags
- What filter should I use to insert a button inside on Media>Add New
- using new WP_Query in save_post function alters $post
- .mo translation strings not loading in PHP scripts that handle AJAX calls
- How to use a hook to override an update_post_meta call in a plugin?
- External Authentication, session_tokens not destroyed on logout
- Trying to understand order and frequency of action hooks firing
- correct way to call javascript into hook function
- Plugin with action ‘save_post’ needs to press publish twice on order to publish
- Strange issue saving custom field data for a WooCommerce order
- do_action and add_action on two different installed plugins won’t work
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- Updating post data on save (save_post vs wp_insert_post_data)
- template_redirect or admin-ajax.php?
- WordPress custom taxonomy check box to dropdown
- Force HTTPS 301 redirect with hook
- What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?
- Does admin_print_scripts-$hook_suffix work for nested paths to individual files?
- Checked() function on a multidimensional array
- Plugin uninstall function is not working
- When does save_post hook fire on post save/update
- Plugin does not add action
- Remove an action by extending class and replacing it
- How to replace default comments with custom HTML?
- Trying to get class to instantiate ONCE (or, “why do I keep punching myself in the head?”)
- Is there an admin hook that will let me read GET variable before it’s too late to set the header Location
- Why enqueue styles on hook?
- Call to undefined function is_home() or any conditional tags
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- WordPress publish_post hook not getting featured image and meta on first publish, but works on updating title
- Add a check box in Menu Settings
- Hide one specific woocoomerce product
- Can I Hook Into the TinyMCE Insert/Edit Link Button to Use Shortlink For Post?
- Using init hook for register_taxonomy is causing invalid_taxonomy in wp_insert_term()
- Redirect returning users to a certain page?
- Restrict certain actions to plugin-specific admin menu pages only
- Set the payment processor callbacks to a plugin
- How to enhance a self developed plugin by its own plugin architecture
- Trigger function on Remove block or add new block in Gutenberg JavaScript
- How to update global variables in plugin activation callback?
- Woocommerce get_term_by() in transition_post_status hook doesn’t works
- Add two button to page and post admin to redirect to : add new & list of (posts – pages) just after saving post or page
- `registration_errors` filter doesn’t seem to be called
- How to grab data after wp user search is complete
- Limit get_next_post to posts from the same author
- Any way, hook to add content right before the “read more” link?
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- Add a custom submenu under submenu in a Custom WordPress Plugin
- How do I ensure I can loop through every enqueued script and CSS?
- Hook for validating and rejecting frontend image upload
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- Nested Hooks with do_action for performance reasons – safe/necessary?
- remove different admin menu for specific users
- replacing jquery google cdn with a new version dynamically
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- Unable to show a message after plugin activation
- plugin modal/popup integration best practice
- save_post not called in plugin / custom field still saving overwriting metaboxes
- Get user logged in status from within a plugin. $current_user not defined
- how to insert content into wp_head after loop_end
- Apply function on all action hooks?
- Send Webhook when post-status is publish or trash
- Using “add_image_size” to register custom image sizes inside plugins not working
- wp_head is not fired from the hook I have used in my plugin
- Trigger a JavaScript function based on the data fetched from Woo commerce hook