You are here

public function LocalTaxTypeBase::applies in Commerce Core 8.2

Checks whether the tax type applies to the given order.

Parameters

\Drupal\commerce_order\Entity\OrderInterface $order: The order.

Return value

bool TRUE if the tax type applies, FALSE otherwise.

Overrides TaxTypeBase::applies

File

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

Class

LocalTaxTypeBase
Provides the base class for local tax types.

Namespace

Drupal\commerce_tax\Plugin\Commerce\TaxType

Code

public function applies(OrderInterface $order) {
  $store = $order
    ->getStore();
  return $this
    ->matchesAddress($store) || $this
    ->matchesRegistrations($store);
}