You are here

protected function LocalTaxTypeBase::matchesAddress in Commerce Core 8.2

Checks whether the tax type matches the store's billing address.

Parameters

\Drupal\commerce_store\Entity\StoreInterface $store: The store.

Return value

bool TRUE if the tax type matches the billing address, FALSE otherwise.

1 call to LocalTaxTypeBase::matchesAddress()
LocalTaxTypeBase::applies in modules/tax/src/Plugin/Commerce/TaxType/LocalTaxTypeBase.php
Checks whether the tax type applies to the given order.
1 method overrides LocalTaxTypeBase::matchesAddress()
CanadianSalesTax::matchesAddress in modules/tax/src/Plugin/Commerce/TaxType/CanadianSalesTax.php
Checks whether the tax type matches the store's billing address.

File

modules/tax/src/Plugin/Commerce/TaxType/LocalTaxTypeBase.php, line 171

Class

LocalTaxTypeBase
Provides the base class for local tax types.

Namespace

Drupal\commerce_tax\Plugin\Commerce\TaxType

Code

protected function matchesAddress(StoreInterface $store) {
  $zones = $this
    ->getMatchingZones($store
    ->getAddress());
  return !empty($zones);
}