Back to list of all filter and action hooks for Address Book for WooCommerce.
Description #
Customize the address source options that should be available for an address type.
Parameters #
$options(array) Address source options.key(string) Option value.label(string) Option display text.
$address_type(string) Address type (billing/shipping).$address_source(string) Address source identifier.
Examples #
/**
* Change the "Enter a new address" label to something else.
*/
function my_custom_new_address_label( $options, $address_type, $address_source ) {
// Change the "Enter a new address" label
if ( isset( $options['new'] ) ) {
$options['new'] = __( 'Add New Address', 'your-text-domain' );
}
return $options;
}
add_filter( 'fc_pro_address_book_address_sources_options', 'my_custom_new_address_label', 10, 3 );
