woocommerce_api_report_response filter-hookWC 1.0

Usage

add_filter( 'woocommerce_api_report_response', 'wp_kama_woocommerce_api_report_response_filter', 10, 4 );

/**
 * Function for `woocommerce_api_report_response` filter-hook.
 * 
 * @param  $sales_data 
 * @param  $report     
 * @param  $fields     
 * @param  $server     
 *
 * @return 
 */
function wp_kama_woocommerce_api_report_response_filter( $sales_data, $report, $fields, $server ){

	// filter...
	return $sales_data;
}
$sales_data
-
$report
-
$fields
-
$server
-

Where the hook is called

WC_API_Reports::get_sales_report()
woocommerce_api_report_response
WC_API_Reports::get_top_sellers_report()
woocommerce_api_report_response
woocommerce/includes/legacy/api/v1/class-wc-api-reports.php 355
return array( 'sales' => apply_filters( 'woocommerce_api_report_response', $sales_data, $this->report, $fields, $this->server ) );
woocommerce/includes/legacy/api/v1/class-wc-api-reports.php 413
return array( 'top_sellers' => apply_filters( 'woocommerce_api_report_response', $top_sellers_data, $this->report, $fields, $this->server ) );
woocommerce/includes/legacy/api/v3/class-wc-api-reports.php 197
return array( 'sales' => apply_filters( 'woocommerce_api_report_response', $sales_data, $this->report, $fields, $this->server ) );
woocommerce/includes/legacy/api/v3/class-wc-api-reports.php 257
return array( 'top_sellers' => apply_filters( 'woocommerce_api_report_response', $top_sellers_data, $this->report, $fields, $this->server ) );
woocommerce/includes/legacy/api/v2/class-wc-api-reports.php 197
return array( 'sales' => apply_filters( 'woocommerce_api_report_response', $sales_data, $this->report, $fields, $this->server ) );
woocommerce/includes/legacy/api/v2/class-wc-api-reports.php 257
return array( 'top_sellers' => apply_filters( 'woocommerce_api_report_response', $top_sellers_data, $this->report, $fields, $this->server ) );

Where the hook is used in WooCommerce

woocommerce/includes/legacy/api/v1/class-wc-api-xml-handler.php 31
add_filter( 'woocommerce_api_report_response', array( $this, 'format_sales_report_data' ), 100 );