WC_Product::set_rating_counts()publicWC 1.0

Set rating counts. Read only.

Method of the class: WC_Product{}

No Hooks.

Return

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 8.7.0

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