WordPress at Your Fingertips
function is not described

WC_Product::set_rating_counts() public WC 1.0

Set rating counts. Read only.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Product = new WC_Product();
$WC_Product->set_rating_counts( $counts );
$counts(array) (required)
Product rating counts.

Code of WC_Product::set_rating_counts() WC 5.5.2

<?php
public function set_rating_counts( $counts ) {
	$this->set_prop( 'rating_counts', array_filter( array_map( 'absint', (array) $counts ) ) );
}