woocommerce_api_product_category_response
Usage
add_filter( 'woocommerce_api_product_category_response', 'wp_kama_woocommerce_api_product_category_response_filter', 10, 5 ); /** * Function for `woocommerce_api_product_category_response` filter-hook. * * @param $product_category * @param $id * @param $fields * @param $term * @param $that * * @return */ function wp_kama_woocommerce_api_product_category_response_filter( $product_category, $id, $fields, $term, $that ){ // filter... return $product_category; }
- $product_category
- -
- $id
- -
- $fields
- -
- $term
- -
- $that
- -
Where the hook is called
woocommerce_api_product_category_response
woocommerce/includes/legacy/api/v3/class-wc-api-products.php 688
return array( 'product_category' => apply_filters( 'woocommerce_api_product_category_response', $product_category, $id, $fields, $term, $this ) );
woocommerce/includes/legacy/api/v2/class-wc-api-products.php 629
return array( 'product_category' => apply_filters( 'woocommerce_api_product_category_response', $product_category, $id, $fields, $term, $this ) );