woocommerce_rest_prepare_reports_import filter-hookWC 1.0

Filter the list returned from the API.


add_filter( 'woocommerce_rest_prepare_reports_import', 'wp_kama_woocommerce_rest_prepare_reports_import_filter', 10, 3 );

 * Function for `woocommerce_rest_prepare_reports_import` filter-hook.
 * @param WP_REST_Response $response The response object.
 * @param array            $item     The original item.
 * @param WP_REST_Request  $request  Request used to generate the response.
 * @return WP_REST_Response
function wp_kama_woocommerce_rest_prepare_reports_import_filter( $response, $item, $request ){

	// filter...
	return $response;
The response object.
The original item.
Request used to generate the response.

Where the hook is called

woocommerce/src/Admin/API/Reports/Import/Controller.php 171
return apply_filters( 'woocommerce_rest_prepare_reports_import', $response, $item, $request );

Where the hook is used in WooCommerce

Usage not found.