Hi Jordan,
Technically this should be a question for WooCommerce support team as that’s a WooCommerce filter.
Please refer this article for more details: https://generatepress.com/what-support-includes/
Maybe we can try wrapping the code in is_woocommerce()
so it only runs on WooCommerce pages?
add_filter('woocommerce_product_get_rating_html', function( $html, $rating, $count ){
if ( is_woocommerce() ) {
global $woocommerce_loop;
global $product;
$loop_data = $woocommerce_loop['name'];
$review_count = $product->get_review_count();
if ( $review_count && $loop_data ) {
$html = '<div class="rating-wrapper">' . $html . $review_count . '</div>';
} elseif ( $review_count < 1 && !is_product() ) {
$html = '';
}
}
return $html;
},10,3);
You can adjust the conditional tag as needed: https://www.businessbloomer.com/woocommerce-conditional-logic-ultimate-php-guide/