Back to list of all filter and action hooks for Address Book for WooCommerce.
Description #
Customize field values when exporting for privacy personal data report.
Parameters #
$field_value(mixed) Field value.$field_key(string) Field key.$address_book_entry(array) Address book 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.
Examples #
/**
* Format phone numbers for privacy export
*/
function format_phone_for_privacy_export( $field_value, $field_key, $address_book_entry ) {
if ( $field_key === 'phone' && ! empty( $field_value ) ) {
return 'Phone: ' . $field_value;
}
return $field_value;
}
add_filter( 'fc_pro_address_book_privacy_export_address_book_entry_field_value', 'format_phone_for_privacy_export', 10, 3 );
