WC_Product::set_rating_countspublicWC 1.0

Set rating counts. Read only.

Method of the class: WC_Product{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

WC_Product::set_rating_counts() code WC 10.6.2

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