populate_internal_data(); parent::__construct( $product ); } /** * Get an array of all sale and regular prices from all variations. * * @param bool $for_display If true, prices will be adapted for display. * @return array Array of prices. */ public function get_variation_prices( $for_display = false ) { $prices = parent::get_variation_prices( $for_display ); $new_prices = array(); foreach ( $prices as $key => $set ) { $new_set = array_map( array( $this, 'compute_native_price' ), $set ); $new_prices[ $key ] = $new_set; } return $new_prices; } }