WordPress at Your Fingertips
filter is not described

woocommerce_rest_prepare_(post_type) filter-hook . WC 1.0

Filter webhook object returned from the REST API.

Usage

add_filter( 'woocommerce_rest_prepare_(post_type)', 'filter_function_name_2093', 10, 3 );
function filter_function_name_2093( $response, $webhook, $request ){
	// filter...

	return $response;
}
$response(WP_REST_Response)
The response object.
$webhook(WC_Webhook)
Webhook object used to create response.
$request(WP_REST_Request)
Request object.

Where the hook is called

WC_REST_Webhooks_V2_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(post_type)
WC_REST_Legacy_Products_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(post_type)
WC_REST_Legacy_Orders_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(post_type)
WC_REST_Legacy_Coupons_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(post_type)
WC_REST_Coupons_V1_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(post_type)
WC_REST_Orders_V1_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(post_type)
WC_REST_Products_V1_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(post_type)
WC_REST_Webhooks_V1_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(post_type)
WC_REST_Order_Refunds_V1_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(post_type)
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-webhooks-v2-controller.php 73
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}", $response, $webhook, $request );
woocommerce/includes/legacy/api/class-wc-rest-legacy-products-controller.php 195
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}", $response, $post, $request );
woocommerce/includes/legacy/api/class-wc-rest-legacy-orders-controller.php 154
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}", $response, $post, $request );
woocommerce/includes/legacy/api/class-wc-rest-legacy-coupons-controller.php 91
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}", $response, $post, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-coupons-v1-controller.php 218
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}", $response, $post, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-orders-v1-controller.php 357
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}", $response, $post, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-products-v1-controller.php 630
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}", $response, $post, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-webhooks-v1-controller.php 581
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}", $response, $webhook, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-order-refunds-v1-controller.php 230
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}", $response, $post, $request );

Where in WP core the hook is used WooCommerce

woocommerce/packages/woocommerce-admin/src/API/Init.php 47
add_filter( 'woocommerce_rest_prepare_shop_order_object', array( __CLASS__, 'add_currency_symbol_to_order_response' ) );
woocommerce/packages/woocommerce-admin/src/Features/Onboarding.php 209
add_filter( 'woocommerce_rest_prepare_themes', array( $this, 'add_uploaded_theme_data' ) );
woocommerce/packages/woocommerce-admin/src/Features/PaymentGatewaySuggestions/PaymentGatewaysController.php 21
add_filter( 'woocommerce_rest_prepare_payment_gateway', array( __CLASS__, 'extend_response' ), 10, 3 );