Back to list of all filter and action hooks for Address Book for WooCommerce.
Description #
Define which fields to skip saving to new address book entries when created from a new order at checkout.
Parameters #
$skip_field_keys(array) Array of field keys to skip. Default:array( 'email' ).$order_id(int) Order ID of the completed order.$data(array) Order data object containing billing and shipping address information.
Examples #
/**
* Skip saving company and phone fields address book when created from a new order at checkout.
*/
function skip_company_phone_when_creating_from_order( $skip_field_keys, $order_id, $data ) {
// Add company and phone to skip list
$skip_field_keys[] = 'company';
$skip_field_keys[] = 'phone';
return $skip_field_keys;
}
add_filter( 'fc_pro_address_book_save_from_order_skip_fields', 'skip_company_phone_when_creating_from_order', 10 );
