woocommerce_api_product_reviews_response
Usage
add_filter( 'woocommerce_api_product_reviews_response', 'wp_kama_woocommerce_api_product_reviews_response_filter', 10, 5 ); /** * Function for `woocommerce_api_product_reviews_response` filter-hook. * * @param $reviews * @param $id * @param $fields * @param $comments * @param $server * * @return */ function wp_kama_woocommerce_api_product_reviews_response_filter( $reviews, $id, $fields, $comments, $server ){ // filter... return $reviews; }
- $reviews
- -
- $id
- -
- $fields
- -
- $comments
- -
- $server
- -
Where the hook is called
woocommerce_api_product_reviews_response
woocommerce/includes/legacy/api/v1/class-wc-api-products.php 229
return array( 'product_reviews' => apply_filters( 'woocommerce_api_product_reviews_response', $reviews, $id, $fields, $comments, $this->server ) );
woocommerce/includes/legacy/api/v3/class-wc-api-products.php 563
return array( 'product_reviews' => apply_filters( 'woocommerce_api_product_reviews_response', $reviews, $id, $fields, $comments, $this->server ) );
woocommerce/includes/legacy/api/v2/class-wc-api-products.php 504
return array( 'product_reviews' => apply_filters( 'woocommerce_api_product_reviews_response', $reviews, $id, $fields, $comments, $this->server ) );