WC_Product_Grouped::get_min_price
Get the minimum price from visible child products.
Метод класса: WC_Product_Grouped{}
Хуков нет.
Возвращает
string. Minimum price or empty string if no children
Использование
$WC_Product_Grouped = new WC_Product_Grouped(); $WC_Product_Grouped->get_min_price();
Список изменений
| С версии 10.1.0 | Введена. |
Код WC_Product_Grouped::get_min_price() WC Product Grouped::get min price WC 11.1.0
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 ) );
}