You are here

function payment_currency_version in Payment 7

Checks what version of Currency is installed, if any.

Return value

integer|false An integer major version, or FALSE if the module is not available.

4 calls to payment_currency_version()
payment_amount_human_readable in ./payment.module
Convert an amount as a float to a human-readable format.
payment_currency_options in ./payment.module
Returns an options list of currencies.
payment_views_data_alter in views/payment.views.inc
Implements hook_views_data_alter().
payment_view_payments in views/payment.views_default.inc
Return the payment overview view.

File

./payment.module, line 1104
Hook implementations and shared functions.

Code

function payment_currency_version() {

  // Currency.module 7.x-1.x and 7.x-2.x both exist, but currency_load() only
  // exists in 7.x-2.x.
  if (module_exists('currency') && function_exists('currency_load')) {
    return 2;
  }
  elseif (module_exists('currency_api')) {
    return 1;
  }
  return FALSE;
}