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.


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;
The prepared comment data for wp_insert_comment.
Request used to insert the comment.

Where the hook is called

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.