WordPress at Your Fingertips
filter is not described

woocommerce_rest_pre_insert_product_review filter-hook . WC 3.5.0

Filters a review before it is inserted via the REST API.

Allows modification of the review right before it is inserted via wp_insert_comment(). Returning a WP_Error value from the filter will shortcircuit insertion and allow skipping further processing.


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

	return $prepared_review;
The prepared review data for wp_insert_comment().
Request used to insert the review.


Since 3.5.0 Introduced.

Where the hook is called

woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller.php 452
$prepared_review = apply_filters( 'woocommerce_rest_pre_insert_product_review', $prepared_review, $request );

Where in WP core the hook is used WooCommerce

Usage not found.