function uc_shipping_address_property_set in Ubercart 7.3
Entity metadata callback to set origin or destination address of an order.
1 string reference to 'uc_shipping_address_property_set'
- uc_shipping_rules_data_info in shipping/
uc_shipping/ uc_shipping.rules.inc - Implements hook_rules_data_info().
File
- shipping/
uc_shipping/ uc_shipping.rules.inc, line 186 - Rules hooks for uc_shipping.module.
Code
function uc_shipping_address_property_set($shipment, $name, $address) {
switch ($name) {
case 'origin':
$type = 'o_';
break;
case 'destination':
$type = 'd_';
break;
default:
return;
}
foreach ($address as $field => $value) {
$shipment->{$type . $field} = $value;
}
}