WordPress at Your Fingertips
function is not described

WC_Product_Variable::get_variation_prices() public WC 1.0

Get an array of all sale and regular prices from all variations. This is used for example when displaying the price range at variable product level or seeing if the variable product is on sale.

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

No Hooks.

Return

Array. Array of RAW prices, regular prices, and sale prices with keys set to variation ID.

Usage

$WC_Product_Variable = new WC_Product_Variable();
$WC_Product_Variable->get_variation_prices( $for_display );
$for_display(true|false)
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_prices() WC 5.7.1

public function get_variation_prices( $for_display = false ) {
	$prices = $this->data_store->read_price_data( $this, $for_display );

	foreach ( $prices as $price_key => $variation_prices ) {
		$prices[ $price_key ] = $this->sort_variation_prices( $variation_prices );
	}

	return $prices;
}