Back to list of all filter and action hooks for Address Book for WooCommerce.
Description #
Customize the checkout field attributes for the address label field.
Modifiers #
{$address_type}(string) The address type. Acceptsshipping,billing, oredit.
Parameters #
$field(array) Field configuration array:label(string) Field label text.type(string) Field type (text,select).required(bool) Whether field is required.default(mixed) Default field value.class(array) CSS classes for the field.priority(int) Field display priority.options(array) Options for select fields.
Examples #
/**
* Customize shipping address label field configuration
*/
function my_custom_shipping_address_label_field( $field ) {
// Change the field label
$field['label'] = 'Label this address';
// Add custom CSS classes
$field['class'][] = 'custom-address-label';
// Set placeholder text
$field['placeholder'] = 'Enter a label for this address...';
// Change description
$field['description'] = 'Add a name to this address (e.g. Home, Office) to tell it apart from others.';
return $field;
}
add_filter( 'fc_pro_shipping_address_label_checkout_field', 'my_custom_shipping_address_label_field', 10 );
