public static function createCurrency() {
    // If default country is Australia do not import the AUD Dollar.
    $default_country = \Drupal::config('system.date')->get('country.default');
    if ($default_country !== 'AU') {
      $currency_importer = \Drupal::service('commerce_price.currency_importer');
      $currency_importer->importByCountry('AU');
    }
  }
public static function createCurrency() {
    // If default country is Australia do not import the AUD Dollar.
    $default_country = \Drupal::config('system.date')->get('country.default');
    if ($default_country !== 'AU') {
      $currency_importer = \Drupal::service('commerce_price.currency_importer');
      $currency_importer->importByCountry('AU');
    }
  }
public static function createCurrency ( ) { // If default country is Australia do not import the AUD Dollar. $ default_country = \ Drupal :: config ( 'system.date' ) -> get ( 'country.default' ) ; if ( $ default_country !== 'AU' ) { $ currency_importer = \ Drupal :: service ( 'commerce_price.currency_importer' ) ; $ currency_importer -> importByCountry ( 'AU' ) ; } }
Create currency.

We do a manual currency create if the site country is not Australia as
the shop is setup for Australia.

@throws \Drupal\Core\Entity\EntityStorageException
Create currency .