You are here

function uc_fedex_shipping_method in FedEx Shipping 5

Same name and namespace in other branches
  1. 6.2 uc_fedex.module \uc_fedex_shipping_method()
  2. 6 uc_fedex.module \uc_fedex_shipping_method()
  3. 7 uc_fedex.module \uc_fedex_shipping_method()

Implementation of Ubercart's hook_shipping_method().

Return value

Array of FedEx shipping services

1 call to uc_fedex_shipping_method()
uc_fedex_quote in ./uc_fedex.module
Callback for retrieving a FedEx shipping quote.

File

./uc_fedex.module, line 124
FedEx Web Services Rate / Available Services Quote

Code

function uc_fedex_shipping_method() {
  $enabled = variable_get('uc_quote_enabled', array(
    'fedex' => TRUE,
  ));
  $weight = variable_get('uc_quote_method_weight', array(
    'fedex' => 0,
  ));
  $methods = array(
    'fedex' => array(
      'id' => 'fedex',
      'title' => t('FedEx'),
      'quote' => array(
        'type' => 'small_package',
        'callback' => 'uc_fedex_quote',
        'accessorials' => _uc_fedex_services(),
      ),
      'enabled' => $enabled['fedex'],
      'weight' => $weight['fedex'],
      'module' => 'uc_fedex',
    ),
  );
  return $methods;
}