woocommerce_rest_insert_product_review

woocommerce_rest_insert_product_review

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_rest_insert_product_review') is found 2 times:

  • /includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller.php line 469
    		 * @param WP_Comment      $review   Inserted or updated comment object.
    		 * @param WP_REST_Request $request  Request object.
    		 * @param bool            $creating True when creating a comment, false when updating.
    		 */
    		do_action( 'woocommerce_rest_insert_product_review', $review, $request, true );
    
    		$fields_update = $this->update_additional_fields_for_object( $review, $request );
    		if ( is_wp_error( $fields_update ) ) {
    			return $fields_update;
    		}
    
    
  • /includes/rest-api/Controllers/Version3/class-wc-rest-product-reviews-controller.php line 577
     
    		$review = get_comment( $id );
    
    		/** This action is documented in includes/api/class-wc-rest-product-reviews-controller.php */
    		do_action( 'woocommerce_rest_insert_product_review', $review, $request, false );
    
    		$fields_update = $this->update_additional_fields_for_object( $review, $request );
    
    		if ( is_wp_error( $fields_update ) ) {
    			return $fields_update;
    		}