Skip to content

Commit

Permalink
Fix ECU postal code selection to use cities.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaio-donadelli committed Jul 14, 2023
1 parent 243da67 commit 9b0c037
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed

- Ecuador postal code settings to be more granular and show the cities list during check-out.

## [3.34.4] - 2023-06-27

### Fixed
Expand Down
10 changes: 5 additions & 5 deletions react/country/ECU.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ONE_LEVEL } from '../constants'
import { firstLevelPostalCodes } from '../transforms/postalCodes'
import { TWO_LEVELS } from '../constants'
import { secondLevelPostalCodes } from '../transforms/postalCodes'
import { getOneLevel, getTwoLevels } from '../transforms/addressFieldsOptions'
import type { PostalCodeRules } from '../types/rules'

Expand Down Expand Up @@ -1278,9 +1278,9 @@ const countryData = {
const rules: PostalCodeRules = {
country: 'ECU',
abbr: 'EC',
postalCodeFrom: ONE_LEVEL,
postalCodeLevels: ['state'],
firstLevelPostalCodes: firstLevelPostalCodes(countryData),
postalCodeFrom: TWO_LEVELS,
postalCodeLevels: ['state', 'city'],
secondLevelPostalCodes: secondLevelPostalCodes(countryData),
fields: [
{
hidden: true,
Expand Down

0 comments on commit 9b0c037

Please sign in to comment.