wp_delete_category()
is a small wrapper around wp_delete_term()
( source ).
It has number of hooks, the one that comes right before delete is:
do_action( 'delete_term_taxonomy', $tt_id );
Hooks after delete:
do_action( 'deleted_term_taxonomy', $tt_id );
do_action('delete_term', $term, $tt_id, $taxonomy);
do_action("delete_$taxonomy", $term, $tt_id);
There are also few earlier hooks that deal with remapping children terms.
Related Posts:
- Difference Between Filter and Action Hooks?
- Which hook should be used to add an action containing a redirect?
- add_action hook for completely new post?
- How do you use the plugin boilerplate loader class to hook actions and filters?
- How Do I Load My Action Earlier Enough?
- Does WP fire delete_post when trashed posts are automatically deleted?
- What’s the earliest point I can get the queried object ID?
- How do I Make a Theme “plugin-ready”?
- What’s the difference between hooks, filters and actions? [duplicate]
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- Is it possible to create an action hook using do_action() within add_action()?
- How can I hook into existing WordPress Bulk actions?
- Define a function outside a class and call the function using action or filter hook
- Create a plugin to change the action to which a function is hooked
- Modifying values with add_action to be sent to db
- Woocommerce – Hide a Column in Cart Table
- Hook to get image filename when it is uploaded
- Should action callbacks start with a verb?
- Execute Hook on the footer or header after activating a plugin
- Namespaced action and filter tags
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- Send push when new post is published in a certain category
- I have 2 plugins using the same wp_login action hook and one is not working
- How dynamic action login_form_{action} is working
- 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()?
- How to get all queries’s results after they have executed?
- Bug: Post needs to be updated twice when adding action for save_post hook
- When does save_post hook fire on post save/update
- Hook add_attachment error
- Call to undefined function is_home() or any conditional tags
- How to find list of all functions bind to a particular hook from my plugin?
- 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()
- Action / Hook when a new plugin is added
- apply_filters() and call_user_func() to define and call a function outside a class
- Post is uncatagorized in publish_post action
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- remove different admin menu for specific users
- add_option_{$option} action hook not being called
- Does WordPress have something like timer hook?
- How can I set a dynamic value for post_updated_messages based on return value of post_updated?
- Insert plugin html content to a specific spot in the frontpage
- Apply function on all action hooks?
- Ninja Forms: Front-End Forms, Post ID?
- How to create an API for my plugin?
- Global Objects and Public Methods
- add_filter OO with parameters
- How do I print a notice only on certain admin pages?
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- How to Make a Category Always Selected?
- Call activation hook multiple times
- Two-step login process – Is it possible?
- Calling clean_term_cache() fails when called in the same plugin that creates terms, succeeds when called separately?
- Get returned variable from a function to add_shortcode function
- Earliest WP Hook to Safely and Reliably Redirect
- Synchronize Custom post type tags to WordPress default posts tags
- template_redirect not being called when using ajax
- Hook into theme-switching later than `setup_theme`
- Is it possible to delay execution of shortcode output callback?
- WordPress Ajax callback function from plugin – OOP
- Why my database table not created on activation?
- add_action in functions.php, do_action in plugin?
- Act on user meta updated, but only once
- Is there any way to allow a plugin to write over a previous version?
- best practice for query string values – get_query_var always empty for my value supplied in query string
- Modifying meta tags after doing ajax call in plugin
- Is it possible to change a term slug before being saved to the database?
- Where to add hooks in a class
- How to use output buffering in WordPress hooked functions?
- Adding option to Gallery shortcode
- Adding rewrite rule dynamically
- How to filter content for specific content variable
- Valid filenames for add_action’s first parameter
- Filter Categories widget to allow custom sorting?
- WordPress class, using add_action to call member function does not work
- Where do I put my add_action(… and add_filter(… and do I need to remove them?
- What happens when two or more plugins use the same hook?
- How can I show posts for a single category?
- How to display the category id along with category name on categories list?
- How to access deleted term inside delete_product_cat action
- wordpress automatic update does not run
- Ajax +wordpress onClick link redirect to new page and create html content
- How to replace settings in WordPress plugin from a theme
- How to relate the Category to user?
- How Can I Add Code To A Preexisting Function Without Editing it
- Setting post_id for single.php based on URL without a redirect
- Exclude Woocommerce Product Category From Sitemap
- Creating posts with links from a txt file
- How to show only the last two categories in a menu?
- Is there any way to get post meta from publish_post hook?
- Passing function into add_action always returns the first argument
- Yoast and another plugin
- Plugin Development – Call to undefined function comment_exists()
- wp_ajax add_action fuction won’t fire on custom jQuery action
- Making Woocommerce optimized for more than 500k products
- Can I use a hook other than ‘init’ to handle form submissions?
- How do I replace title with my plugin?
- Looking for Hook that is fired after a plugin or wp upgrade is installed/updated
- How to remove a class [closed]
- Woocommerce: block user removing cart item