function commerce_avatax_requirements in Drupal Commerce Connector for AvaTax 7.3
Same name and namespace in other branches
- 7.5 commerce_avatax.install \commerce_avatax_requirements()
- 7.4 commerce_avatax.install \commerce_avatax_requirements()
Implementation of hook_requirements().
File
- ./
commerce_avatax.install, line 6
Code
function commerce_avatax_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time
$t = get_t();
$has_soap = extension_loaded('soap');
$requirements['commerce_avatax_soap'] = array(
'title' => $t('SOAP'),
'value' => $has_soap ? $t('Enabled for AvaTax Calc') : $t('Not found'),
);
if (!$has_soap) {
$requirements['commerce_avatax_soap']['severity'] = REQUIREMENT_ERROR;
$requirements['commerce_avatax_soap']['description'] = $t('AvaTax requires SOAP to be configured on your server.');
}
return $requirements;
}