public function DefaultExchangerCalculator::getExchangerId in Commerce Exchanger 8
Return configuration file of active provider or NULL.
Return value
string|null Return provider.
Overrides ExchangerCalculatorInterface::getExchangerId
File
- src/
DefaultExchangerCalculator.php, line 10
Class
Namespace
Drupal\commerce_exchangerCode
public function getExchangerId() {
// Return the first one.
foreach ($this->providers as $provider) {
if ($provider
->status()) {
return $provider
->getExchangerConfigName();
}
}
return NULL;
}