You are here

function uc_address_field_enabled in Ubercart 7.3

Same name and namespace in other branches
  1. 8.4 uc_store/uc_store.module \uc_address_field_enabled()
  2. 5 uc_store/uc_store.module \uc_address_field_enabled()
  3. 6.2 uc_store/uc_store.module \uc_address_field_enabled()

Returns TRUE if the address field is enabled.

4 calls to uc_address_field_enabled()
uc_checkout_pane_address in uc_cart/uc_cart_checkout_pane.inc
Generic address pane handler.
uc_order_pane_bill_to in uc_order/uc_order.order_pane.inc
Handles the "Bill to" order pane.
uc_order_pane_ship_to in uc_order/uc_order.order_pane.inc
Handles the "Ship to" order pane.
uc_store_process_address_field in uc_store/uc_store.module
Element process hook for address fields.

File

uc_store/uc_store.module, line 1244
Contains global Ubercart functions and store administration functionality.

Code

function uc_address_field_enabled($field = NULL) {
  $fields = variable_get('uc_address_fields', drupal_map_assoc(array(
    'first_name',
    'last_name',
    'phone',
    'company',
    'street1',
    'street2',
    'city',
    'zone',
    'postal_code',
    'country',
  )));
  return $field ? isset($fields[$field]) : $fields;
}