You are here

function commerce_requirements in Commerce Core 8.2

Implements hook_requirements().

File

./commerce.install, line 11
Contains install and update functions for Commerce.

Code

function commerce_requirements($phase) {
  $requirements = [];
  if ($phase == 'install' || $phase == 'runtime') {
    if (!extension_loaded('bcmath')) {
      $requirements['commerce_bcmath'] = [
        'title' => t('BC Math'),
        'description' => t('Commerce requires the BC Math PHP extension.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}