WC_Product::get_rating_counts()publicWC 1.0

Get rating count.

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

No Hooks.

Return

Array. of counts

Usage

$WC_Product = new WC_Product();
$WC_Product->get_rating_counts( $context );
$context(string)
What the value is for. Valid values are view and edit.
Default: 'view'

Code of WC_Product::get_rating_counts() WC 6.8.2

public function get_rating_counts( $context = 'view' ) {
	return $this->get_prop( 'rating_counts', $context );
}