Back to list of all filter and action hooks for Address Book for WooCommerce.
Description #
Customize address book entry label markup when displaying on a list of available addresses.
Parameters #
$markup(string) Formatted address markup HTML.$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).
Examples #
/**
* Show only name and city for cleaner look
*/
function name_and_city_only( $markup, $address_entry, $address_type ) {
$markup = '<strong>' . $address_entry['first_name'] . ' ' . $address_entry['last_name'] . '</strong><br>';
$markup .= $address_entry['city'] . ', ' . $address_entry['state'];
return $markup;
}
add_filter( 'fc_pro_address_book_entry_label_markup', 'name_and_city_only', 10, 3 );
