You are here

function commerce_discount_requirements in Commerce Discount 7

Implements hook_requirements().

Ensure inline_conditions is enabled.

File

./commerce_discount.install, line 162
Install, update, and uninstall functions for the commerce discount module.

Code

function commerce_discount_requirements($phase) {
  $requirements = array();

  // Ensure translations don't break during installation.
  $t = get_t();
  if ($phase == 'runtime') {
    if (!module_exists('inline_conditions')) {
      $requirements['inline_conditions'] = array(
        'title' => $t('Inline Conditions'),
        'value' => $t('Inline Conditions has to be installed.'),
        'severity' => REQUIREMENT_WARNING,
      );
    }
  }
  return $requirements;
}