uc_order_address
Drupal 7 uc_order_address($order, $type)
Returns an address from an order object.
Parameters
$order: An order object.
$type: Either 'delivery' or 'billing'.
6 calls to uc_order_address()
File
- sites/
all/ modules/ ubercart/ uc_order/ uc_order.module, line 1444 - Handles all things concerning Ubercart orders.
Code
function uc_order_address($order, $type) {
$name = $order->{$type . '_first_name'} . ' ' . $order->{$type . '_last_name'};
$address = uc_address_format(
$order->{$type . '_first_name'},
$order->{$type . '_last_name'},
$order->{$type . '_company'},
$order->{$type . '_street1'},
$order->{$type . '_street2'},
$order->{$type . '_city'},
$order->{$type . '_zone'},
$order->{$type . '_postal_code'},
$order->{$type . '_country'}
);
if (variable_get('uc_order_capitalize_addresses', TRUE)) {
$address = drupal_strtoupper($address);
}
return $address;
}

