woothemes/woocommerce — pull request #6284 by ragulka (2014-09-17 08:08:07+00:00)
Title: Allow getting rating count for a specific rating number

This PR adds an optional param to the `get_rating_count` method of `WC_Product` class. This allows getting the rating count for a specific rating number. Useful if you want to determine how the review ratings break down - how many n-star reviews a product has gotten etc.

Completely backwards-compatible, since it's only adding an optional param.

```php
$product->get_rating_count( 2 ); // Will return the number of 2-star ratings on this product
```