woocommerce_api_product_response filter-hookWC 1.0

Usage

add_filter( 'woocommerce_api_product_response', 'wp_kama_woocommerce_api_product_response_filter', 10, 4 );

/**
 * Function for `woocommerce_api_product_response` filter-hook.
 * 
 * @param  $product_data 
 * @param  $product      
 * @param  $fields       
 * @param  $server       
 *
 * @return 
 */
function wp_kama_woocommerce_api_product_response_filter( $product_data, $product, $fields, $server ){

	// filter...
	return $product_data;
}
$product_data
-
$product
-
$fields
-
$server
-

Where the hook is called

WC_API_Products::get_product()
woocommerce_api_product_response
woocommerce/includes/legacy/api/v1/class-wc-api-products.php 127
return array( 'product' => apply_filters( 'woocommerce_api_product_response', $product_data, $product, $fields, $this->server ) );
woocommerce/includes/legacy/api/v3/class-wc-api-products.php 218
return array( 'product' => apply_filters( 'woocommerce_api_product_response', $product_data, $product, $fields, $this->server ) );
woocommerce/includes/legacy/api/v2/class-wc-api-products.php 169
return array( 'product' => apply_filters( 'woocommerce_api_product_response', $product_data, $product, $fields, $this->server ) );

Where the hook is used in WooCommerce

woocommerce/includes/legacy/api/v1/class-wc-api-xml-handler.php 34
add_filter( 'woocommerce_api_product_response', array( $this, 'format_product_data' ), 100 );