You are here

public function ProductVariationTrait::getUbercartCurrency in Commerce Migrate 3.1.x

Same name and namespace in other branches
  1. 8.2 modules/ubercart/src/Plugin/migrate/source/ProductVariationTrait.php \Drupal\commerce_migrate_ubercart\Plugin\migrate\source\ProductVariationTrait::getUbercartCurrency()
  2. 3.0.x modules/ubercart/src/Plugin/migrate/source/ProductVariationTrait.php \Drupal\commerce_migrate_ubercart\Plugin\migrate\source\ProductVariationTrait::getUbercartCurrency()

Gets the Ubercart global currency.

Return value

string The currency.

1 call to ProductVariationTrait::getUbercartCurrency()
ProductVariationTrait::prepareRow in modules/ubercart/src/Plugin/migrate/source/ProductVariationTrait.php

File

modules/ubercart/src/Plugin/migrate/source/ProductVariationTrait.php, line 51

Class

ProductVariationTrait
Ubercart product variation source.

Namespace

Drupal\commerce_migrate_ubercart\Plugin\migrate\source

Code

public function getUbercartCurrency() {
  static $currency;
  if (empty($currency)) {
    $currency = $this
      ->variableGet('uc_currency_code', 'USD');
  }
  return $currency;
}