You get 500 error, because you’ve added your filter incorrectly… It takes 4 params, but you register it as it was using only one.
add_action('delete_product_cat', 'sync_cat_delete', 10, 1);
// 10 is priority, 1 is number of params to take
function sync_cat_delete($term, $tt_id, $deleted_term, $object_ids){
var_dump($deleted_term);
}
So if you change that 1 to 4, it should be OK.
Related Posts:
- Send an email when custom post type category is changed
- what is the action hook code to supporting product category condition in single product page of woocommerce?
- Remove word “Category” from WooCommerce product page [closed]
- Filter WooCommerce archive pages by an additional category
- How to delete WooCommerce categories in bulk that only have one product
- Display All Products by Category with WooCommerce
- Retrieve Product category ‘NAME’ by product category ID – WooCommerce?
- Hook when category is added to post
- Woocommerce get category image full size
- WordPress Multisite: Adding actions to only one site
- How to remove action hook done in a plugin from functions.php in my theme?
- Programmatically create product category and add thumbnail in woocommerce
- Reflect nested categories in appearance > menus
- Create product category and keyword search form in woocommerce? [closed]
- Remove child products from woocommerce category page [closed]
- How do I edit pre_get_post for the category the user is currently in?
- Prevent function from triggering again when post in specific category gets another category?
- How to Remove a Filter from the Admin List Table?
- Remove action on product archive page [closed]
- Display WooCommerce product categories in a 4 columns custom menu [closed]
- How to select product category while adding new product in woocommerce? [closed]
- Use get_term_children to get the sub category of a parent category for the current post
- Hide uncategorized products from the shop page
- Action hooks returning old category instead of new category
- Disable email field on WooCommerce customer account details
- Filtering search results
- WooCommerce change category url and product base
- How to prevent action in ajax request, when in admin side?
- Woocommerce – Hide a Column in Cart Table
- Output link to category from WP_Query loop of woocommerce products
- display woocommerce all category title on home page
- Add my own function to existing WooCommerce hook
- Is there a Woocommerce hook that fires when applying a coupon but before checking if it’s valid?
- Add Icons to the Product Category Sidebar Widget WooCommerce
- What is the action hook for an order that fails on frontend checkout in WooCommerce?
- Add Product categories to WordPress menu without losing hierarchy
- Display “add to cart” button on every listing in product category page?
- Replace category titles
- How to get product count with respect to categories in WooComerce
- Custom page for WooCommerce’s /product-category/
- How to add custom script to the particular Product Category page
- Getting categories id for all products in cart
- How to remove the “+Add Category” button from the Category metabox?
- Get woocommerce catogry
- Hide posts of a certain category unless logged in
- Add title, post content, and category like add_post_meta and update_post_meta
- functions.php conditional tag – only show in single.php?
- Which are the hooks run before/after when a category’s deletion?
- get_cat_ID() not wokring
- Display child categories in WooCommerce
- WooCommerce duplicate sub categories and product slugs
- Set the default category of an attachment
- Set post categories to include parents when setting child category
- WooCommerce IF statements not working
- Linking products to categories
- Woocommerce category show subcategories only/omit posts for specific category
- Which hook should I use to capture $_POST(‘password’) via profile update and password reset
- Warning: sizeof (): Parameter must be an array or an object that implements Countable, On products pages
- Omit specific product categories from WooCommerce shortcode
- products nested by subcategories in a current category archive
- Edit WooCommerce product content based on category
- WC 3.x Get categories from variable product of the cart
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Product Category WooCommerce
- Hide woocommerce category name from specific pages
- Hide woocommerce category name from specific pages
- need to add custom field in more products
- How to redefine the sorting of product categories by menu_order?
- Pagination not visible on woocommerce’s category page
- Pagination is not working properly in Product Category/Tag pages
- Best way of getting WooCommerce category path
- How to recreate a copy of a product category in WooCommerce? [closed]
- Get parrent category name
- Sorting category products not working
- How to list all WC products by their attributes values?
- Assign category from custom field on post creation and update
- Remove product category placeholder image (Woocomerce)
- Categories for each brands
- Change thumbnail image depending product category
- Unwanted Duplicate Product Categories in WooCommerce
- Woocommerce custom category pages
- Customize WordPress widget – Product Category
- WordPress/Woocommerce only show category in shop to a single role
- Execute JavaScript in WordPress Hook
- WooCommerce – How to show specific category first-rest of products-specific category last
- Woocommerce custom category page with pagination [closed]
- How to hide category name
- WooCommerce Hook: Content get’s displayed twice and not AFTER the order total
- Categories widget show empty?
- Categories are not listing their respective products
- Display single category name in woocommerce loop
- Building Menu from Woocommerce Product Categories
- Include WooCommerce product to all child categories
- woocommerce related products by specific categories [closed]
- Do not show sub categories in the loop on archive-product.php
- List just subcategory and products of active category page in Woocommerce
- List a maximum of ‘x’ product categories with qty of ‘y’ in each column
- Display all product tags associated with a specific product category
- WooCommerce: after install hook
- why get_the_post_thumbnail( the_ID()) echos extra post id
- password_reset doesnt work