WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
фильтр не описан

woocommerce_rest_prepare_(post_type)_object хук-фильтр . WC 1.0

Filter the data for a response.

The dynamic portion of the hook name, $this->post_type, refers to object type being prepared for the response.

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

add_filter( 'woocommerce_rest_prepare_(post_type)_object', 'filter_function_name_9448', 10, 3 );
function filter_function_name_9448( $response, $object, $request ){
	// filter...

	return $response;
}
$response(WP_REST_Response)
The response object.
$object(WC_Data)
Object data.
$request(WP_REST_Request)
Request object.

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

WC_REST_Product_Variations_Controller::prepare_object_for_response()
woocommerce_rest_prepare_(post_type)_object
WC_REST_Products_V2_Controller::prepare_object_for_response()
woocommerce_rest_prepare_(post_type)_object
WC_REST_Coupons_V2_Controller::prepare_object_for_response()
woocommerce_rest_prepare_(post_type)_object
WC_REST_Order_Refunds_V2_Controller::prepare_object_for_response()
woocommerce_rest_prepare_(post_type)_object
WC_REST_Product_Variations_V2_Controller::prepare_object_for_response()
woocommerce_rest_prepare_(post_type)_object
WC_REST_Orders_V2_Controller::prepare_object_for_response()
woocommerce_rest_prepare_(post_type)_object
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php 98
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-products-v2-controller.php 189
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-coupons-v2-controller.php 222
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-order-refunds-v2-controller.php 218
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-product-variations-v2-controller.php 236
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php 367
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );

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

woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php 45
add_filter( 'woocommerce_rest_prepare_shop_order_object', array( __CLASS__, 'add_currency_symbol_to_order_response' ) );