Problem/Motivation

The Commerce Price module imports the currency for the default site county on install; however it is installed in Commerce Kickstart before the default currency is set.

Proposed resolution

Use similar code to commerce_price_install() to add default currency in commerce_kickstart_install(), or another install task that happens after the default country has been selected.

Comments

dwkitchen created an issue. See original summary.

dwkitchen’s picture

Status: Active » Fixed

This has now been added to the install

function commerce_kickstart_install_process(&$install_state) {

  // Import a currency to speed up initial store setup.
  // If no default country is set, import the US Dollar, since it's common.
  $default_country = \Drupal::config('system.date')->get('country.default');
  $default_country = $default_country ?: 'US';
  $currency_importer = \Drupal::service('commerce_price.currency_importer');
  $currency_importer->importByCountry($default_country);

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.