public function update_rating_counts($product) { update_post_meta($product->get_id(), '_wc_rating_count', $product->get_rating_counts('edit')); }