You are here

public function CurrencyHelper::defaultCurrencyCode in Commerce Currency Resolver 8

Get default currency from current resolved store.

Return value

string Return currency code.

Overrides CurrencyHelperInterface::defaultCurrencyCode

File

src/CurrencyHelper.php, line 216

Class

CurrencyHelper
Helper for various parts of the module.

Namespace

Drupal\commerce_currency_resolver

Code

public function defaultCurrencyCode() {
  if ($store = $this->currentStore
    ->getStore()) {
    return $store
      ->getDefaultCurrencyCode();
  }
  return $this
    ->fallbackCurrencyCode();
}