You are here

function commerce_userpoints_currencies_option_list in Commerce userpoints 7

Return value

An array of userpoints categories that used as currency.

1 call to commerce_userpoints_currencies_option_list()
commerce_userpoints_payment_method_settings_form in commerce_userpoints_payment_method/commerce_userpoints_payment_method.module
Payment method callback; return the settings form for a payment method.

File

./commerce_userpoints.module, line 95
Hook implementations and API functions for the commerce_userpoints module.

Code

function commerce_userpoints_currencies_option_list() {
  $userpoint_currencies = commerce_userpoints_currencies();
  if (!empty($userpoint_currencies)) {
    $options = array();
    foreach ($userpoint_currencies as $key => $val) {
      $options[$key] = $val['name'];
    }
    return $options;
  }
  return FALSE;
}