rest_delete_product_review action-hookWC 1.0

Fires after a product review is deleted via the REST API.

Usage

add_action( 'rest_delete_product_review', 'wp_kama_rest_delete_product_review_action', 10, 3 );

/**
 * Function for `rest_delete_product_review` action-hook.
 * 
 * @param object           $product_review The deleted item.
 * @param WP_REST_Response $response       The response data.
 * @param WP_REST_Request  $request        The request sent to the API.
 *
 * @return void
 */
function wp_kama_rest_delete_product_review_action( $product_review, $response, $request ){

	// action...
}
$product_review(object)
The deleted item.
$response(WP_REST_Response)
The response data.
$request(WP_REST_Request)
The request sent to the API.

Where the hook is called

WC_REST_Product_Reviews_V1_Controller::delete_item()
rest_delete_product_review
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-product-reviews-v1-controller.php 430
do_action( 'rest_delete_product_review', $product_review, $response, $request );

Where the hook is used in WooCommerce

Usage not found.