WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Routes

ProductReviews::normalize_query_param() protected WC 1.0

Prepends internal property prefix to query parameters to match our response fields.

{} It's a method of the class: ProductReviews{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->normalize_query_param( $query_param );
$query_param(string) (required)
Query parameter.

Code of ProductReviews::normalize_query_param() WC 5.8.0

protected function normalize_query_param( $query_param ) {
	$prefix = 'comment_';

	switch ( $query_param ) {
		case 'id':
			$normalized = $prefix . 'ID';
			break;
		case 'product':
			$normalized = $prefix . 'post_ID';
			break;
		case 'rating':
			$normalized = 'meta_value_num';
			break;
		default:
			$normalized = $prefix . $query_param;
			break;
	}

	return $normalized;
}