diff --git a/classes/abstracts/abstract-wc-product.php b/classes/abstracts/abstract-wc-product.php index 03bddb3f7661f..5610badc8d9d6 100644 --- a/classes/abstracts/abstract-wc-product.php +++ b/classes/abstracts/abstract-wc-product.php @@ -914,7 +914,7 @@ function get_rating_html( $location = '' ) { AND comment_post_ID = %d AND comment_approved = '1' AND meta_value > 0 - "), $this->id ); + ", $this->id ) ); $ratings = $wpdb->get_var( $wpdb->prepare(" SELECT SUM(meta_value) FROM $wpdb->commentmeta @@ -922,7 +922,7 @@ function get_rating_html( $location = '' ) { WHERE meta_key = 'rating' AND comment_post_ID = %d AND comment_approved = '1' - "), $this->id ); + ", $this->id ) ); if ( $count > 0 ) $average_rating = number_format($ratings / $count, 2); diff --git a/templates/single-product-reviews.php b/templates/single-product-reviews.php index 14acab7b11c3b..fe1f1fcbc4b5c 100644 --- a/templates/single-product-reviews.php +++ b/templates/single-product-reviews.php @@ -24,7 +24,7 @@ AND comment_post_ID = %d AND comment_approved = '1' AND meta_value > 0 - "), $post->ID ); + ", $post->ID ) ); $rating = $wpdb->get_var( $wpdb->prepare(" SELECT SUM(meta_value) FROM $wpdb->commentmeta @@ -32,7 +32,7 @@ WHERE meta_key = 'rating' AND comment_post_ID = %d AND comment_approved = '1' - "), $post->ID ); + ", $post->ID ) ); if ( $count > 0 ) {