woocommerce_rest_prepare_webhook_delivery хук-фильтрWC 1.0

Filter webhook delivery object returned from the REST API.

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

add_filter( 'woocommerce_rest_prepare_webhook_delivery', 'wp_kama_woocommerce_rest_prepare_webhook_delivery_filter', 10, 3 );

/**
 * Function for `woocommerce_rest_prepare_webhook_delivery` filter-hook.
 * 
 * @param WP_REST_Response $response The response object.
 * @param stdClass         $log      Delivery log object used to create response.
 * @param WP_REST_Request  $request  Request object.
 *
 * @return WP_REST_Response
 */
function wp_kama_woocommerce_rest_prepare_webhook_delivery_filter( $response, $log, $request ){

	// filter...
	return $response;
}
$response(WP_REST_Response)
The response object.
$log(stdClass)
Delivery log object used to create response.
$request(WP_REST_Request)
Request object.

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

WC_REST_Webhook_Deliveries_V2_Controller::prepare_item_for_response()
woocommerce_rest_prepare_webhook_delivery
WC_REST_Webhook_Deliveries_V1_Controller::prepare_item_for_response()
woocommerce_rest_prepare_webhook_delivery
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-webhook-deliveries-v2-controller.php 55
return apply_filters( 'woocommerce_rest_prepare_webhook_delivery', $response, $log, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-webhook-deliveries-v1-controller.php 187
return apply_filters( 'woocommerce_rest_prepare_webhook_delivery', $response, $log, $request );

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

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