function uc_ups_ca_predicate in Ubercart 6.2
Implements hook_ca_predicate().
Connect the UPS quote action and event.
File
- shipping/
uc_ups/ uc_ups.module, line 194 - Shipping quote module that interfaces with www.ups.com to get rates for small package shipments.
Code
function uc_ups_ca_predicate() {
$enabled = variable_get('uc_quote_enabled', array());
$predicates = array(
'uc_ups_get_quote' => array(
'#title' => t('Shipping quote from UPS'),
'#trigger' => 'get_quote_from_ups',
'#class' => 'uc_ups',
'#status' => $enabled['ups'],
'#actions' => array(
array(
'#name' => 'uc_quote_action_get_quote',
'#title' => t('Fetch a shipping quote'),
'#argument_map' => array(
'order' => 'order',
'method' => 'method',
),
),
),
),
);
return $predicates;
}