* wcSettings: fix countries getSettings

* Revert "wcSettings: fix countries getSettings"

This reverts commit cdccfa95cded4b1d7e8908102e8814a0281b027e.

* fix incorrect countries usage

* apply countries fix to Customers Report
This commit is contained in:
Paul Sealock 2019-10-01 10:43:26 +13:00 committed by GitHub
parent 202fde95b5
commit 029e514c75
3 changed files with 8 additions and 3 deletions

View File

@ -5,7 +5,9 @@
import { __, _x } from '@wordpress/i18n';
import { decodeEntities } from '@wordpress/html-entities';
import { applyFilters } from '@wordpress/hooks';
import { COUNTRIES as countries } from '@woocommerce/wc-admin-settings';
import { getSetting } from '@woocommerce/wc-admin-settings';
const { countries } = getSetting( 'dataEndpoints', { countries: {} } );
/**
* Internal dependencies

View File

@ -13,7 +13,9 @@ import { defaultTableDateFormat } from '@woocommerce/date';
import { formatCurrency, getCurrencyFormatDecimal } from '@woocommerce/currency';
import { Date, Link } from '@woocommerce/components';
import { numberFormat } from '@woocommerce/number';
import { COUNTRIES as countries } from '@woocommerce/wc-admin-settings';
import { getSetting } from '@woocommerce/wc-admin-settings';
const { countries } = getSetting( 'dataEndpoints', { countries: {} } );
/**
* Internal dependencies

View File

@ -6,8 +6,9 @@ import { __ } from '@wordpress/i18n';
import { decodeEntities } from '@wordpress/html-entities';
import { SelectControl, TextControl } from 'newspack-components';
import { useMemo } from 'react';
import { COUNTRIES as countries } from '@woocommerce/wc-admin-settings';
import { getSetting } from '@woocommerce/wc-admin-settings';
const { countries } = getSetting( 'dataEndpoints', { countries: {} } );
/**
* Form validation.
*