You are here

public function TaxZone::getRate in Commerce Core 8.2

Gets the tax rate with the given ID.

Parameters

string $rate_id: The tax rate ID.

Return value

\Drupal\commerce_tax\TaxRate|null The tax rate, or NULL if none found.

File

modules/tax/src/TaxZone.php, line 167

Class

TaxZone
Represents a tax zone.

Namespace

Drupal\commerce_tax

Code

public function getRate($rate_id) {
  return isset($this->rates[$rate_id]) ? $this->rates[$rate_id] : NULL;
}