public function Avatax::applies in Drupal Commerce Connector for AvaTax 8
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
- src/
Plugin/ Commerce/ TaxType/ Avatax.php, line 92
Class
- Avatax
- Provides the AvaTax remote tax type.
Namespace
Drupal\commerce_avatax\Plugin\Commerce\TaxTypeCode
public function applies(OrderInterface $order) {
$config = $this->configFactory
->get('commerce_avatax.settings');
return !$config
->get('disable_tax_calculation');
}