WC_Product_Grouped::get_min_pricepublicWC 10.1.0

Get the minimum price from visible child products.

Method of the class: WC_Product_Grouped{}

No Hooks.

Returns

String. Minimum price or empty string if no children

Usage

$WC_Product_Grouped = new WC_Product_Grouped();
$WC_Product_Grouped->get_min_price();

Changelog

Since 10.1.0 Introduced.

WC_Product_Grouped::get_min_price() code WC 10.8.1

public function get_min_price() {
	$children = $this->get_primed_visible_children();
	$prices   = array_map( 'wc_get_price_to_display', $children );

	if ( empty( $prices ) ) {
		return '';
	}

	return wc_format_decimal( min( $prices ) );
}