-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added "getCountryName" selector #15548
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests pass. Change LGTM.
One optional note below.
@@ -72,6 +72,23 @@ export const getCountries = ( state, continentCode, siteId = getSelectedSiteId( | |||
* @param {Object} state Whole Redux state tree | |||
* @param {String} countryCode 2-letter ISO country code | |||
* @param {Number} [siteId] Site ID to check. If not provided, the Site ID selected in the UI will be used | |||
* @return {String} The country name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention that the countryCode will sometimes be returned if a country name can't be found/loaded.
…s. (#15549) * Added a helper to merge locations edits with temporary locations edits. * Added "JOURNAL_ACTIONS" variable definition so tests can pass. * Added actions & UI reducers for the shipping locations edit UI (#15550) * Added actions & UI reducers for the shipping locations edit UI * Added UI selectors for the Shipping Zone locations edit (#15551) * Added UI selectors for the Shipping Zone locations edit * Added missing "export". * Added a selector to check if the zone currently being edited has a valid set of locations. (#15552)
Fixes #14274
Adds a "getCountryName" selector. For a given country code, it returns its name.
It's not currently used, so just check that tests pass.