WC_Product::set_rating_counts
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() 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 ) ) );
}