woocommerce_api_product_reviews_response хук-фильтр . WC 1.0
Использование
add_filter( 'woocommerce_api_product_reviews_response', 'filter_function_name_1922', 10, 5 ); function filter_function_name_1922( $reviews, $id, $fields, $comments, $server ){ // filter... return $reviews; }
- $reviews
- -
- $id
- -
- $fields
- -
- $comments
- -
- $server
- -
Где вызывается хук
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/v2/class-wc-api-products.php 504
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 ) );