woocommerce_rest_delete_webhook_object action-hookWC 1.0

Fires after a single item is deleted or trashed via the REST API.

Usage

add_action( 'woocommerce_rest_delete_webhook_object', 'wp_kama_woocommerce_rest_delete_webhook_object_action', 10, 3 );

/**
 * Function for `woocommerce_rest_delete_webhook_object` action-hook.
 * 
 * @param WC_Webhook       $webhook  The deleted or trashed item.
 * @param WP_REST_Response $response The response data.
 * @param WP_REST_Request  $request  The request sent to the API.
 *
 * @return void
 */
function wp_kama_woocommerce_rest_delete_webhook_object_action( $webhook, $response, $request ){

	// action...
}
$webhook(WC_Webhook)
The deleted or trashed item.
$response(WP_REST_Response)
The response data.
$request(WP_REST_Request)
The request sent to the API.

Where the hook is called

WC_REST_Webhooks_V1_Controller::delete_item()
woocommerce_rest_delete_webhook_object
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-webhooks-v1-controller.php 495
do_action( 'woocommerce_rest_delete_webhook_object', $webhook, $response, $request );

Where the hook is used in WooCommerce

Usage not found.