Skip to main content

fc_checkout_address_i18n_override_locale_required_attribute

Type: Filter

Filters whether to override the required attribute 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_required_attribute', $override_required );

Parameters​

NameTypeDescription
$override_requiredboolWhether to override the required attribute for address i18n.

Since​

  • 3.0.5

Source: inc/checkout-fields.php

Examples​

add_filter( 'fc_checkout_address_i18n_override_locale_required_attribute',
/**
* Override locale required attributes with checkout field attributes.
*
* @param bool $override_required Whether to override the required attribute for address i18n.
* @return bool Filtered value.
*/
function( $override_required ) {
return true;
},
10
);