function commerce_stripe_requirements in Commerce Stripe 8
Same name and namespace in other branches
- 7.3 commerce_stripe.install \commerce_stripe_requirements()
- 7 commerce_stripe.install \commerce_stripe_requirements()
- 7.2 commerce_stripe.install \commerce_stripe_requirements()
Implements hook_requirements().
File
- ./
commerce_stripe.install, line 11 - Contains install and update functions for Commerce Stripe.
Code
function commerce_stripe_requirements($phase) {
$requirements = [];
if ($phase == 'install') {
if (!class_exists('\\Stripe\\Stripe')) {
$requirements['commerce_stripe_library'] = [
'description' => t('Commerce Stripe requires the stripe/stripe-php library.'),
'severity' => REQUIREMENT_ERROR,
];
}
}
return $requirements;
}