You are here

function uc_country_install in Ubercart 8.4

Implements hook_install().

File

uc_country/uc_country.install, line 13
Install, update, and uninstall functions for the uc_country module.

Code

function uc_country_install() {

  // Use the site default country to determine which country should
  // be enabled by default. All others will be available but disabled.
  $site_country = \Drupal::config('system.date')
    ->get('country.default');
  if ($site_country) {
    Country::load($site_country)
      ->enable()
      ->save();
  }
}