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

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

Filter a term item returned from the API.

Allows modification of the term data right before it is returned.

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

add_filter( 'woocommerce_rest_prepare_(taxonomy)', 'filter_function_name_8220', 10, 3 );
function filter_function_name_8220( $response, $item, $request ){
	// filter...

	return $response;
}
$response(WP_REST_Response)
The response object.
$item(объект)
The original term object.
$request(WP_REST_Request)
Request used to generate the response.

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

WC_REST_Product_Categories_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(taxonomy)
WC_REST_Product_Categories_V2_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(taxonomy)
WC_REST_Product_Tags_V1_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(taxonomy)
WC_REST_Product_Attribute_Terms_V1_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(taxonomy)
WC_REST_Product_Shipping_Classes_V1_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(taxonomy)
WC_REST_Product_Categories_V1_Controller::prepare_item_for_response()
woocommerce_rest_prepare_(taxonomy)
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-categories-controller.php 88
return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-product-categories-v2-controller.php 88
return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-product-tags-v1-controller.php 79
return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-product-attribute-terms-v1-controller.php 166
return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-product-shipping-classes-v1-controller.php 79
return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-product-categories-v1-controller.php 104
return apply_filters( "woocommerce_rest_prepare_{$this->taxonomy}", $response, $item, $request );

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

woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-categories-controller.php 45
add_filter( 'woocommerce_rest_prepare_shop_order_object', array( __CLASS__, 'add_currency_symbol_to_order_response' ) );
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-categories-controller.php 215
add_filter( 'woocommerce_rest_prepare_themes', array( $this, 'add_uploaded_theme_data' ) );