apply_filters( 'woocommerce_rest_pre_insert_product_review', array|WP_Error $prepared_review , WP_REST_Request $request )
Filters a review before it is inserted via the REST API.
Description Description
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.
Parameters Parameters
- $prepared_review
-
The prepared review data for wp_insert_comment().
- $request
-
Request used to insert the review.
Source Source
File: includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller.php
Changelog Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |