woocommerce_delete_(post_type)
Usage
add_action( 'woocommerce_delete_(post_type)', 'wp_kama_woocommerce_delete_post_type_action' );
/**
* Function for `woocommerce_delete_(post_type)` action-hook.
*
* @param $id
*
* @return void
*/
function wp_kama_woocommerce_delete_post_type_action( $id ){
// action...
}
- $id
- -
Where the hook is called
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 422
do_action( 'woocommerce_delete_' . $post_type, $id );
Where the hook is used in WooCommerce
woocommerce/src/Blocks/BlockTypesController.php 64
add_action( 'woocommerce_delete_product_transients', array( $this, 'delete_product_transients' ) );
woocommerce/src/Internal/Fulfillments/FulfillmentsManager.php 56
add_action( 'woocommerce_delete_order_refund', array( $this, 'update_fulfillment_status_after_refund_deleted' ), 10, 1 );
woocommerce/src/Internal/ProductFilters/CacheController.php 47
add_action( 'woocommerce_delete_product_transients', array( $this, 'invalidate_filter_data_cache' ) );