function uc_address_field_enabled in Ubercart 5
Same name and namespace in other branches
- 8.4 uc_store/uc_store.module \uc_address_field_enabled()
- 6.2 uc_store/uc_store.module \uc_address_field_enabled()
- 7.3 uc_store/uc_store.module \uc_address_field_enabled()
Return TRUE if a field is enabled.
4 calls to uc_address_field_enabled()
- uc_checkout_pane_billing in uc_cart/
uc_cart_checkout_pane.inc - Get the billing information.
- uc_checkout_pane_delivery in uc_cart/
uc_cart_checkout_pane.inc - Get the delivery information.
- uc_order_pane_bill_to in uc_order/
uc_order_order_pane.inc - Handle the "Bill to" order pane.
- uc_order_pane_ship_to in uc_order/
uc_order_order_pane.inc - Handle the "Ship to" order pane.
File
- uc_store/
uc_store.module, line 2145 - Contains global Ubercart functions and store administration functionality.
Code
function uc_address_field_enabled($field) {
$fields = variable_get('uc_address_fields', drupal_map_assoc(array(
'first_name',
'last_name',
'phone',
'company',
'street1',
'street2',
'city',
'zone',
'postal_code',
'country',
)));
if (!isset($fields[$field])) {
return FALSE;
}
else {
return TRUE;
}
}