Back to list of all filter and action hooks for Address Book for WooCommerce.
Description #
Customize the markup for an individual address book entry list item at checkout.
Parameters #
$markup(string) The HTML markup.$address_entry(array) Address entry data.first_name(string) First name.last_name(string) Last name.address_1(string) Address line 1.address_2(string) Address line 2.city(string) City.state(string) State/Province.postcode(string) Postal code.country(string) Country code.company(string) Company name.phone(string) Phone number.email(string) Email address.
$address_type(string) Address type (billing/shipping).$address_label(string) Formatted address label.$is_selected_address(bool) Whether this address is selected.$first(bool) Whether this is the first entry.
Examples #
/**
* Add simple custom class to address book entries
*/
function add_simple_custom_class_to_address_book_entries( $markup, $address_entry, $address_type, $address_label, $is_selected_address, $first ) {
// Simply add a custom class
$markup = str_replace(
'class="address-book-entry update_totals_on_change"',
'class="address-book-entry update_totals_on_change my-custom-class"',
$markup
);
return $markup;
}
add_filter( 'fc_pro_address_book_entry_markup', 'add_simple_custom_class_to_address_book_entries', 10, 6 );
