WordPress at Your Fingertips
filter is not described

rest_pre_insert_product_review filter-hook . WC 1.0

Filter a product review (comment) before it is inserted via the REST API.

Allows modification of the comment right before it is inserted via wp_insert_comment.

Usage

add_filter( 'rest_pre_insert_product_review', 'filter_function_name_5490', 10, 2 );
function filter_function_name_5490( $prepared_review, $request ){
	// filter...

	return $prepared_review;
}
$prepared_review(array)
The prepared comment data for wp_insert_comment.
$request(WP_REST_Request)
Request used to insert the comment.

Where the hook is called

WC_REST_Product_Reviews_V1_Controller::create_item()
rest_pre_insert_product_review
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-product-reviews-v1-controller.php 273
$prepared_review = apply_filters( 'rest_pre_insert_product_review', $prepared_review, $request );

Where in WP core the hook is used WooCommerce

Usage not found.