- Issue created by @rszrama
I was seeing some odd messages when testing with Commerce SQL Sanitize today and discovered through some debugging, though perhaps unrelated to my issue, that Commerce AvaTax will attempt to apply taxes even if no API credentials have been configured yet. Since this module ships with a default tax type configuration, I believe this means your store is broken until you configure AvaTax upon installation of this module.
Any reason we don't add a check in Avatax::applies()
to see if AvaTax has been fully configured?
public function applies(OrderInterface $order) {
$config = $this->configFactory->get('commerce_avatax.settings');
// Do not apply if the API credentials aren't set.
if (!$config->get('account_id') ||
!$config->get('license_key') ||
!$config->get('company_code')) {
return FALSE;
}
return !$config->get('disable_tax_calculation');
}
Active
1.0
Code