You need to match the $priority
you used to hook the action:
remove_action( 'save_post', array( $this, 'save_box' ), 20 /* Same as add_action call */ );
http://codex.wordpress.org/Function_Reference/remove_action
Make sure you take the $post_id
argument in your save_box
method too:
function save_box( $post_id ) {
...
}
Related Posts:
- How to catch and modify custom field values when a page is updated
- 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?
- Show admin notice if metabox field is empty during save post
- Why do some hooks not work inside class context?
- trigger save_post event programmatically
- __NAMESPACE__ with register_activation_hook
- Is it possible to save/modify a post without calling the “save_post” action hook?
- Hooks are not executing
- Create hooks based on an array of hook names?
- Returning ACF custom field from publish_post
- How to check what kind of saving it is?
- Firing a function AFTER redirect
- How to properly setup an activation hook
- Conditional for autosave or auto draft?
- admin_notices action doesn’t trigger within save_post action
- save_post hook to add terms getting deleted when using bulk edit
- ‘save_post’ hook not working in WP 3.5
- WordPress plugin activation, deactivation and uninstall hook not being triggered
- Is there a before_save_post hook or something similar
- Block Update Profile Errors
- Add action save post when create and publish
- Problem with call_user_func_array front end
- WordPress save_post hook not firing when checking if _GET[‘post’] is set
- Object oriented programming, add_action in constructor not firing
- Which hook should I use for this scenario regarding the registration process and account/profile update?
- How to use the password_reset hook to validate new password and display error
- How do I set a custom post type Category after import using wp_set_post_terms
- update ACF field when saving post on back office
- Webhooks – Differ between new/existing updates
- Is there a way to send HTML formatted emails with WordPress’ wp_mail() function?
- How to get WordPress’ hooks/actions run sequence?
- Where can I find a list of WordPress hooks?
- Is there a save_post hook for custom post types?
- Where is the right place to register/enqueue scripts & styles
- How to know what functions are hooked to an action/filter?
- How to hook update_post_meta and delete_post_meta?
- what is correct way to hook when update post
- Are there any hooks that alter the 404 logic?
- Is there a hook that runs after a user logs in?
- Add validation and error handling when saving custom fields?
- Difference between do_action and add_action
- Check for update vs new post on save_post action
- WP Cron Doesn’t Execute When Time Elapses
- How to avoid infinite loop in save_post callback
- WooCommerce: change display order of product short description and price [closed]
- Registering Class methods as hook callbacks
- Difference between after_setup_theme and init action hooks?
- get $post in init filter or action?
- Use wp init hook to call other hooks?
- How many times can I hook into the same action?
- How do I implement the WordPress Iris picker into my plugin on the front-end?
- How to intercept a 404 error
- Move excerpt meta box to above content editor
- Action hook for custom tax edit
- Trigger custom action when setting button pressed
- What is “all” in isset($wp_filter[‘all’])
- Whats worth using add_action when we can simply use add_filter?
- Is there a limit to hook priority?
- Please explain how these hooks work
- Add_action to wp_head via functions.php
- Hook after image is uploaded and image sizes generated
- Is there a hook before the user is authenticated?
- Hook that fires when admin setting is saved
- add_action(‘wp_ajax_[action name]’, myfunction) problem
- What is the difference between update_post_meta and update_postmeta hooks?
- Connection lost. Saving has been disabled… (Updating Posts/Pages)
- Hook ‘wp_enqueue_scripts’ priority has no effect
- Hook on trash post
- Hook *after* user password change?
- Auto-retrieve YouTube Image for Thumbnail?
- Which hook if user profile information is updated?
- How to remove action hook done in a plugin from functions.php in my theme?
- Hooks for trashing, deleting, saving, restoring custom post type
- Is there a WordPress core & plugins update action hook?
- Hook into WordPress update?
- Implementing advanced add_* function wrappers
- Adding onload to body
- My add_action (wp_footer, ‘method’) is not calling?
- Do WordPress Core Filenames Work as Hooks?
- What is the earliest possible hook for safely using `is_front_page`?
- switch_to_blog(): Load textdomain
- How to call a REST endpoint when a post is published?
- Can I hook inside another hook?
- Adding function directly vs using hook in function.php
- Are hooks called synchronously?
- How to check if which hook triggered the call to a function?
- How can I send to multiple Contact Form 7 recipients based on form input? [closed]
- Hook into wp_head(); in a plugin
- Send data to 3rd party api with wp_remote_post on wp_login
- is it possible to get the hook name in add_action?
- Hook for URL Request
- flush_rewrite_rules on save_post Does Not Work on First Post Save
- How do I flush the rules after saving settings using the Settings API?
- Run javascript code after wp_login hook?
- Does anyone have a visual breakdown of core hooks and when they are fired?
- How to customize the WP admin default help contents
- What is the action hook for save media-form on gallery tab?
- What hook is executed just after wp_query has been executed?
- Hide gutenberg option blocks