Hide store address fields in regions that specify hidden (https://github.com/woocommerce/woocommerce-admin/pull/8172)
* Hide store address fields in regions that specify hidden * Add changelog entry
This commit is contained in:
parent
9cfd69d778
commit
ecd8c34c42
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: Tweak
|
||||
|
||||
Hide store address fields in regions that specify hidden #8172
|
|
@ -281,6 +281,7 @@ export function StoreAddress( props ) {
|
|||
|
||||
return (
|
||||
<div className="woocommerce-store-address-fields">
|
||||
{ ! locale?.address_1?.hidden && (
|
||||
<TextControl
|
||||
label={
|
||||
locale?.address_1?.label ||
|
||||
|
@ -290,7 +291,9 @@ export function StoreAddress( props ) {
|
|||
autoComplete="address-line1"
|
||||
{ ...getInputProps( 'addressLine1' ) }
|
||||
/>
|
||||
) }
|
||||
|
||||
{ ! locale?.address_2?.hidden && (
|
||||
<TextControl
|
||||
label={
|
||||
locale?.address_2?.label ||
|
||||
|
@ -300,6 +303,7 @@ export function StoreAddress( props ) {
|
|||
autoComplete="address-line2"
|
||||
{ ...getInputProps( 'addressLine2' ) }
|
||||
/>
|
||||
) }
|
||||
|
||||
<SelectControl
|
||||
label={ __( 'Country / Region', 'woocommerce-admin' ) }
|
||||
|
@ -315,6 +319,7 @@ export function StoreAddress( props ) {
|
|||
{ countryStateAutofill }
|
||||
</SelectControl>
|
||||
|
||||
{ ! locale?.city?.hidden && (
|
||||
<TextControl
|
||||
label={
|
||||
locale?.city?.label || __( 'City', 'woocommerce-admin' )
|
||||
|
@ -323,7 +328,9 @@ export function StoreAddress( props ) {
|
|||
{ ...getInputProps( 'city' ) }
|
||||
autoComplete="address-level2"
|
||||
/>
|
||||
) }
|
||||
|
||||
{ ! locale?.postcode?.hidden && (
|
||||
<TextControl
|
||||
label={
|
||||
locale?.postcode?.label ||
|
||||
|
@ -333,6 +340,7 @@ export function StoreAddress( props ) {
|
|||
autoComplete="postal-code"
|
||||
{ ...getInputProps( 'postCode' ) }
|
||||
/>
|
||||
) }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue