WordPress at Your Fingertips
function is not described

WC_Product::get_rating_counts() public WC 1.0

Get rating count.

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

No Hooks.


Array. of counts


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

Code of WC_Product::get_rating_counts() WC 5.8.0

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