getFromPriceArray($price); } else { $price = new Price(toDecimal($price), $currencyContext->getActive(), 0); } } if (array_key_exists($toCurrency, $currencyContext->getSupported())) { $toCurrency = $currencyContext->getSupported()[$toCurrency]; $price = PriceCalculator::convert($price, $toCurrency); return printPrice($price->getPriceWithVat(), ['currency' => $toCurrency]); } else { user_error('Modifier convert_price: Unsupported currency '.$toCurrency); } }