You are here

function uc_ups_configuration in Ubercart 5

Implementation of hook_configuration().

Connect the UPS quote action and event.

File

shipping/uc_ups/uc_ups.module, line 135
Shipping quote module that interfaces with www.ups.com to get rates for small package shipments.

Code

function uc_ups_configuration() {
  $enabled = variable_get('uc_quote_enabled', array());
  $configurations = array(
    'uc_ups_get_quote' => array(
      '#label' => t('Shipping quote from UPS'),
      '#event' => 'get_quote_from_ups',
      '#module' => 'uc_ups',
      '#active' => $enabled['ups'],
    ),
  );
  $action = workflow_ng_use_action('uc_quote_action_get_quote', array(
    '#label' => t('Fetch a shipping quote'),
  ));
  $configurations['uc_ups_get_quote'] = workflow_ng_configure($configurations['uc_ups_get_quote'], $action);
  return $configurations;
}