function commerce_avatax_requirements in Drupal Commerce Connector for AvaTax 7.5
Same name and namespace in other branches
- 7.3 commerce_avatax.install \commerce_avatax_requirements()
- 7.4 commerce_avatax.install \commerce_avatax_requirements()
Implements hook_requirements().
File
- ./
commerce_avatax.install, line 11 - Installation functions for Commerce Avatax module.
Code
function commerce_avatax_requirements($phase) {
// Skip the requirements check if SimpleTest is installed.
if (module_exists('simpletest')) {
return;
}
$requirements = array();
// Ensure translations don't break at install time.
$t = get_t();
$has_curl = extension_loaded('curl');
$requirements['commerce_avatax_curl'] = array(
'title' => $t('cURL'),
'value' => $has_curl ? $t('Enabled') : $t('Not found'),
);
if (!$has_curl) {
$requirements['commerce_avatax_curl']['severity'] = REQUIREMENT_ERROR;
$requirements['commerce_avatax_curl']['description'] = $t('Commerce Avatax requires PHP cURL extension to be enabled and configured on your server.');
}
return $requirements;
}