Back to list of all filter and action hooks for Address Book for WooCommerce.
Description #
Customize address book list entries markup on the account page.
Allows to modify the HTML markup used to display individual address entries in the account area.
Parameters #
$markup(string) HTML markup.$address_entry(array) Address entry data. Which usually will contain the fields below.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.
$address_id(string) Address book entry ID.
Examples #
/**
* Add custom class and label to account address entry markup
*/
function add_custom_address_entry_markup( $markup, $address_entry, $address_id ) {
// Add custom class to the existing li element
$markup = str_replace( 'class="address-book-entry"', 'class="address-book-entry custom-class"', $markup );
return $markup;
}
add_filter( 'fc_pro_address_book_entry_account_markup', 'add_custom_address_entry_markup', 10, 3 );
