WordPress at a glance
function is not described

wc_rest_check_product_reviews_permissions() WC 3.5.0

Check product reviews permissions on REST API.

Hooks from the function
Return

true|false. Nothing.

Usage

wc_rest_check_product_reviews_permissions( $context, $object_id );
$context(string)
Request context.
$object_id(string)
Object ID.

Changelog

Since 3.5.0 Introduced.

Code of wc_rest_check_product_reviews_permissions() WC 5.2.2

<?php
function wc_rest_check_product_reviews_permissions( $context = 'read', $object_id = 0 ) {
	$permission = false;
	$contexts   = array(
		'read'   => 'moderate_comments',
		'create' => 'moderate_comments',
		'edit'   => 'moderate_comments',
		'delete' => 'moderate_comments',
		'batch'  => 'moderate_comments',
	);

	if ( isset( $contexts[ $context ] ) ) {
		$permission = current_user_can( $contexts[ $context ] );
	}

	return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, $object_id, 'product_review' );
}