WC_Product_Variable::get_variation_sale_price()publicWC 1.0

Get the min or max variation sale price.

{} Это метод класса: WC_Product_Variable{}

Хуки из метода

Возвращает

Строку.

Использование

$WC_Product_Variable = new WC_Product_Variable();
$WC_Product_Variable->get_variation_sale_price( $min_or_max, $for_display );
$min_or_max(строка)
Min or max price.
По умолчанию: 'min'
$for_display(true|false)
If true, prices will be adapted for display based on the woocommerce_tax_display_shop setting (including or excluding taxes).
По умолчанию: false

Код WC_Product_Variable::get_variation_sale_price() WC 6.4.1

public function get_variation_sale_price( $min_or_max = 'min', $for_display = false ) {
	$prices = $this->get_variation_prices( $for_display );
	$price  = 'min' === $min_or_max ? current( $prices['sale_price'] ) : end( $prices['sale_price'] );

	return apply_filters( 'woocommerce_get_variation_sale_price', $price, $this, $min_or_max, $for_display );
}