I'm setting up a function for Woocommerce that display discount price and the regular price for variable product, this function add a " from to " text before the price range.
The "WooCommerce variable products: keep only "min" price with a custom label" answer thread matches the best with what I am looking for and work like a charm!
But when all variations in a variable product have the same prices, the " start from " should not be displayed.
So I've made a simple try and add below the "if" condition
else {
$price = sprintf( __( '%1$s', 'woocommerce' ), $min_price_html );
return $price;
}
and integrate in the if condition:
$price = sprintf( __( 'À partir de %1$s', 'woocommerce' ), $min_price_html );
return $price;
But it doesn't really work. Some help is appreciated and welcome.