WC_Product_Variable::get_variation_price()publicWC 1.0

Get the min or max variation (active) price.

{} It's a method of the class: WC_Product_Variable{}

Hooks from the method




$WC_Product_Variable = new WC_Product_Variable();
$WC_Product_Variable->get_variation_price( $min_or_max, $for_display );
Min or max price.
Default: 'min'
If true, prices will be adapted for display based on the woocommerce_tax_display_shop setting (including or excluding taxes).
Default: false

Code of WC_Product_Variable::get_variation_price() WC 6.8.2

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

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