public function PriceExchangerCalculator::getExchangerId in Commerce Currency Resolver 8
Return configuration file of active provider or NULL.
Return value
string|null Return provider.
Overrides ExchangerCalculatorInterface::getExchangerId
File
- src/
PriceExchangerCalculator.php, line 17
Class
- PriceExchangerCalculator
- Class PriceExchangerCalculator.
Namespace
Drupal\commerce_currency_resolverCode
public function getExchangerId() {
$resolver_exchanger_id = $this->configFactory
->get('commerce_currency_resolver.settings')
->get('currency_exchange_rates');
if (isset($this->providers[$resolver_exchanger_id]) && $this->providers[$resolver_exchanger_id]
->status()) {
return $this->providers[$resolver_exchanger_id]
->getExchangerConfigName();
}
return NULL;
}