Use existing store country if address line 1 is set (https://github.com/woocommerce/woocommerce-admin/pull/3595)

This commit is contained in:
Joshua T Flowers 2020-01-21 20:57:16 +08:00 committed by GitHub
parent bade1da7f9
commit a6c0d8f063
1 changed files with 3 additions and 4 deletions

View File

@ -39,11 +39,10 @@ class StoreDetails extends Component {
showUsageModal: false, showUsageModal: false,
}; };
// Check if a store address is set so that we don't default
// to WooCommerce's default country of the UK.
const countryState = const countryState =
( profileItems.hasOwnProperty( 'setup_client' ) && ( settings.woocommerce_store_address && settings.woocommerce_default_country ) || '';
null !== profileItems.setup_client &&
settings.woocommerce_default_country ) ||
'';
this.initialValues = { this.initialValues = {
addressLine1: settings.woocommerce_store_address || '', addressLine1: settings.woocommerce_store_address || '',