You are here

function uc_order_address_property_set in Ubercart 7.3

Entity metadata callback: set the delivery or billing address of an order.

1 string reference to 'uc_order_address_property_set'
uc_order_entity_property_info in uc_order/uc_order.info.inc
Implements hook_entity_property_info().

File

uc_order/uc_order.module, line 2262

Code

function uc_order_address_property_set($order, $name, $address) {
  switch ($name) {
    case 'delivery_address':
      $type = 'delivery_';
      break;
    case 'billing_address':
      $type = 'billing_';
      break;
    default:
      return;
  }
  foreach ($address as $field => $value) {
    if ($field != 'email') {
      $order->{$type . $field} = $value;
    }
  }
}