woocommerce_delete_order хук-событиеWC 1.0

Delete the associated post, which in turn deletes order items, etc. through WC_Post_Data{}. Once we stop creating posts for orders, we should do the cleanup here instead.

Использование

add_action( 'woocommerce_delete_order', 'wp_kama_woocommerce_delete_order_action' );

/**
 * Function for `woocommerce_delete_order` action-hook.
 * 
 * @param  $order_id 
 *
 * @return void
 */
function wp_kama_woocommerce_delete_order_action( $order_id ){

	// action...
}
$order_id
-

Где вызывается хук

OrdersTableDataStore::delete()
woocommerce_delete_order
Abstract_WC_Order_Data_Store_CPT::delete()
woocommerce_delete_order
woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php 1106
do_action( 'woocommerce_delete_order', $order_id ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment

Где используется хук в WooCommerce

Использование не найдено.