<?php
if ( !$product->is_type( 'variable' ) ) {
echo woocommerce_single_price();
} else {
$variations = $product->get_available_variations();
$a = round($product->get_variation_price('max', true), 2);
$t = false;
foreach ( $variations as $key ) {
if (round($key["display_price"], 2) != $a) {
$t = true;
}
}
if (!$t) {
echo woocommerce_single_price();
}
}
?>
This fixes the problem.