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
- Is there a save_post hook for custom post types?
- Difference between do_action and add_action
- Difference between after_setup_theme and init action hooks?
- get $post in init filter or action?
- How to intercept a 404 error
- Move excerpt meta box to above content editor
- Trigger custom action when setting button pressed
- Which hook if user profile information is updated?
- flush_rewrite_rules on save_post Does Not Work on First Post Save
- Disable block from editor based on post type
- WP Rest API – Upload media without saving attachment post
- Difference between hooks Plugin_loaded and admin_int?
- Hook/notify when any option or setting is added or updated
- Which hooks is this? add_action(‘wp’,
- admin_notices after register_uninstall / deactivate_hook
- add_action on inherit post status
- Why does wp_enqueue_script ignore my ‘wp_head’ hook?
- action lifecycle
- Redirect users on specific post category or category page
- How to modify an add_action() inside a loop of core function
- Can I edit the wp_post > post_content right before its inserted/updated?
- What is the best filter where to use register_block_type?
- How get list all users who edited post?
- Stuck in redirect loop after using wp_login action
- Hooks for Links Box [duplicate]
- Check if do_action(‘custom_action’) is hooked into?
- Hook after wp_enqueue_scripts
- wp_login Action hook with conditional tag
- Can I remove WooCommerce main content hook?
- How to alter the query using pre_get_posts hook and is_post_type_archive
- How to update WordPress core or themes and still have my child theme hooks work
- How can I count post views of REST API calls and update them in an ACF field?
- Event-Driven Pattern vs MVC?
- Using hooks with extra parameters
- new_to_publish fires multiple times
- Plugin init hook
- Is there a hook that fires when a row of wp_sitemeta table is updated?
- `rest_user_query` can’t access post author in post edit screen
- Post Meta Emtpy on Publish Using Transition
- How to check post type when using sanitize_title hook?
- How do I trigger a post update within a get_posts() foreach loop?
- Duplicate Cron Jobs Using wp_next_scheduled / wp_schedule_event
- Hook when editing user
- get_post_metadata causing some meta data to fail
- How to change the default mail when admin approuved an user?
- How to modify how the_content outputs a link to an internal page
- Clear cache on post of one type when something happens to post of other type
- How to register a widget when saving a post?
- Remove genesis_404 hook from genesis_loop [closed]
- What hooks do I need to hook into to capture ever wp_user creation/change?
- Neccessary to call add_submenu_page and add_menu_page from admin_menu hook?
- Adding custom Bulk Actions
- How to call do_action() to pass arguments to hooked functions that take different number of args?
- Is it likely that do_action will have unexpected results?
- How to export category name and category link in wordpress json
- Error later wordpress 5.3.2 update. Please help
- How to abort a save operation with a WordPress hook?
- is_page not triggering
- admin_post_(action) hook create console log error
- Check if front page within function passed to action
- Hook after creating a post and retrieve infos from this post immediatly
- $new_pass always returns null – password_reset hook
- calling a function from a class in your template
- Get new (not old) post inside transition_post_status hook
- How to Show Different Information to your authors/contributers
- Cannot override hooks.php
- Removing action from template class
- Function is Missing an Action Hook
- How to access variables in the function where apply_filters() is called?
- OOP Plugin: Where should I place the action hooks in the class?
- PHP Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered