function uc_address_field_required in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_store/uc_store.module \uc_address_field_required()
- 7.3 uc_store/uc_store.module \uc_address_field_required()
Returns TRUE if the address field field is required.
2 calls to uc_address_field_required()
- uc_checkout_pane_billing in uc_cart/
uc_cart_checkout_pane.inc - Gets the billing information.
- uc_checkout_pane_delivery in uc_cart/
uc_cart_checkout_pane.inc - Gets the delivery information.
File
- uc_store/
uc_store.module, line 1236 - Contains global Ubercart functions and store administration functionality.
Code
function uc_address_field_required($field) {
$fields = variable_get('uc_address_fields_required', drupal_map_assoc(array(
'first_name',
'last_name',
'street1',
'city',
'zone',
'postal_code',
'country',
)));
if (!isset($fields[$field])) {
return FALSE;
}
else {
return TRUE;
}
}