rest_preprocess_product_review
Usage
add_filter( 'rest_preprocess_product_review', 'wp_kama_rest_preprocess_product_review_filter', 10, 2 ); /** * Function for `rest_preprocess_product_review` filter-hook. * * @param $prepared_review * @param $request * * @return */ function wp_kama_rest_preprocess_product_review_filter( $prepared_review, $request ){ // filter... return $prepared_review; }
- $prepared_review
- -
- $request
- -
Where the hook is called
rest_preprocess_product_review
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-product-reviews-v1-controller.php 509
return apply_filters( 'rest_preprocess_product_review', $prepared_review, $request );