Skip to main content

fc_checkout_address_i18n_override_locale_attributes

Type: Filter

Filters which attributes to globally override for address i18n locale information.

IMPORTANT: This filter is intended to be used with some 3rd-party Checkout Field Editor plugins. Be extra careful when changing the list of attributes to override for address i18n (internationalization), as it may cause other fields to behave unexpectedly, such as the State field becoming optional when it should be required.

Signature​

apply_filters( 'fc_checkout_address_i18n_override_locale_attributes', $override_attributes );

Parameters​

NameTypeDescription
$override_attributesarrayAttributes to override globally.

Since​

  • 3.0.5

Source: inc/checkout-fields.php

Examples​

add_filter( 'fc_checkout_address_i18n_override_locale_attributes',
/**
* Override locale attributes for address fields.
*
* @param array $override_attributes Attributes to override globally.
* @return array Filtered value.
*/
function( $override_attributes ) {
$override_attributes[] = 'custom-attribute';
return $override_attributes;
},
10
);