You are here

protected function ExchangerProviderRemoteBase::buildExchangeRates in Commerce Exchanger 8

Process all currencies for rates for other currencies.

Return value

array Return prepared data for saving.

1 call to ExchangerProviderRemoteBase::buildExchangeRates()
ExchangerProviderRemoteBase::import in src/Plugin/Commerce/ExchangerProvider/ExchangerProviderRemoteBase.php

File

src/Plugin/Commerce/ExchangerProvider/ExchangerProviderRemoteBase.php, line 91

Class

ExchangerProviderRemoteBase
Base class for Commerce exchanger provider plugins.

Namespace

Drupal\commerce_exchanger\Plugin\Commerce\ExchangerProvider

Code

protected function buildExchangeRates() {

  // If we use enterprise and we don't want cross sync feature.
  if ($this
    ->isEnterprise() && !$this
    ->useCrossSync()) {
    return $this
      ->importEnterprise();
  }

  // Everything else.
  return $this
    ->importCrossSync();
}