fix method name

This commit is contained in:
Mike Jolley 2019-02-15 11:50:26 +00:00
parent 4dd5cef7b9
commit 048f33935c
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ class WC_Comments {
public static function clear_transients( $post_id ) {
if ( 'product' === get_post_type( $post_id ) ) {
$product = wc_get_product( $post_id );
$product->set_rating_count( self::get_rating_counts_for_product( $product ) );
$product->set_rating_counts( self::get_rating_counts_for_product( $product ) );
$product->set_average_rating( self::get_average_rating_for_product( $product ) );
$product->set_review_count( self::get_review_count_for_product( $product ) );
$product->save();