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 do I get the sub categories of the parent when in a sub category?
- Adding function to Genesis genesis_header [closed]
- How to filter content for specific content variable
- template_redirect or admin-ajax.php?
- WordPress custom taxonomy check box to dropdown
- load_plugin_textdomain doestn’t work with add_action plugins_loaded
- Force HTTPS 301 redirect with hook
- Show error message after exception handled
- Add a new confirmation page before saving
- 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?
- use of do_action() without any functions attached
- What happens when two or more plugins use the same hook?
- Does admin_print_scripts-$hook_suffix work for nested paths to individual files?
- Function/Class to list categories with checkboxes
- Plugin uninstall function is not working
- Delete data from database using row action
- flush rewrite rules after plugin update?
- Plugin does not add action
- Remove an action by extending class and replacing it
- Add child pages to submenu automatically
- After plugin activation hook
- How to replace default comments with custom HTML?
- Odd map_meta_cap $args on post edit — sometimes integer, sometimes string
- Trying to get class to instantiate ONCE (or, “why do I keep punching myself in the head?”)
- How can I create a custom plugin that allows anonymous users to signup without registering?
- hook filter after the_content on a specific page
- Bind a function with its own argument to show something dynamically after every content
- A question about add_action()
- 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?
- What’s the hook for filtering every texts of site?
- How can I show posts for a single category?
- Hook for page Request?
- Check if post belongs to any category
- Associate multiple email addresses with the same user account, so they can log in with either
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- Run command “composer install” when activating wordpress plugin
- Update variable value via add_filter
- How to display the categories on page using shortcode?
- Add a check box in Menu Settings
- How to display the category id along with category name on categories list?
- Custom filter not working
- hook update_option/updated_option empty $old_value and $value
- How to access deleted term inside delete_product_cat action
- add_action pre_term_description vs. pre_category_description
- Configure WordPress to Generate Scheme-less Relative URLs
- Hide one specific woocoomerce product
- How to show parents of current page category, excluding the category?
- Include HTML (Bootstrap Modal Box) with a plugin into my header
- wordpress automatic update does not run
- WP Dropdown Categories, display subcategories but not grandchildren categories?
- Ajax +wordpress onClick link redirect to new page and create html content
- How to replace settings in WordPress plugin from a theme