function commerce_price_requirements in Commerce Core 8.2
Implements hook_requirements().
File
- modules/
price/ commerce_price.install, line 11 - Contains install and update functions for Price.
Code
function commerce_price_requirements($phase) {
$requirements = [];
if ($phase == 'install' || $phase == 'runtime') {
if (!class_exists('\\CommerceGuys\\Intl\\Currency\\CurrencyRepository')) {
$requirements['commerce_price_intl'] = [
'title' => t('Intl library'),
'description' => t("Commerce Price requires the commerceguys/intl library."),
'severity' => REQUIREMENT_ERROR,
];
}
}
return $requirements;
}