Hello guys i need help with Woocommerce grouped price.
I want the grouped product to show only the price from the cheapest product.
Im currently using this code, works perfectly but only shows the sale price.
I want to be able to show and the regular price
example:
to be shown like this

I want the grouped product to show only the price from the cheapest product.
Im currently using this code, works perfectly but only shows the sale price.
I want to be able to show and the regular price
Code:
add_filter( 'woocommerce_grouped_price_html', 'bbloomer_grouped_price_range_from', 10, 3 );
function bbloomer_grouped_price_range_from( $price, $product, $child_prices ) {
$prices = array( min( $child_prices ), max( $child_prices ) );
$price = $prices[0] !== $prices[1] ? sprintf( __( '%1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
return $price;
}
example:

