You are here

commerce_stripe.install in Commerce Stripe 8

Contains install and update functions for Commerce Stripe.

File

commerce_stripe.install
View source
<?php

/**
 * @file
 * Contains install and update functions for Commerce Stripe.
 */

/**
 * Implements hook_requirements().
 */
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;
}

Functions