Revert "Get rating count should use is_array"

This reverts commit 0625a2b759.
This commit is contained in:
Mike Jolley 2017-02-02 18:43:43 +01:00
parent 0625a2b759
commit 2ec4b8cf7f
1 changed files with 1 additions and 1 deletions

View File

@ -1767,7 +1767,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
public function get_rating_count( $value = null ) {
$counts = $this->get_rating_counts();
if ( is_array( $value ) ) {
if ( is_null( $value ) ) {
return array_sum( $counts );
} elseif ( isset( $counts[ $value ] ) ) {
return absint( $counts[ $value ] );