You are here

function commerce_userpoints_load in Commerce userpoints 7

Load a userpoints currency based on the code.

2 calls to commerce_userpoints_load()
commerce_userpoints_payment_method_submit_form in commerce_userpoints_payment_method/commerce_userpoints_payment_method.module
Payment method callback: submit form.
commerce_userpoints_payment_method_transaction in commerce_userpoints_payment_method/commerce_userpoints_payment_method.module
Creates a userpoints payment transaction for the specified charge amount.

File

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

Code

function commerce_userpoints_load($code) {
  $currencies = commerce_userpoints_currencies();
  if (isset($currencies[$code])) {
    return $currencies[$code];
  }
  return FALSE;
}