Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Customers should be able to save the optional region while config option Allow to Choose State if It is Optional for Country is set to Yes only #1032

Closed
@TomashKhamlai

Description

@TomashKhamlai

Preconditions (*)

  1. No preconditions

Steps to reproduce (*)

Customers should be able to save the optional region while config option Allow to Choose State if It is Optional for Country is set to Yes only

  1. Navigate to Store -> Settings -> Configuration -> General -> General -> State Options
  2. Find United States on the list. Press <Ctrl> or <Cmd> and remove the United States from the selection.
  3. Change value for the Allow to Choose State if It is Optional for Country option to No and save the configuration.
  4. Flush cache
  5. Perform mutation as a Customer
mutation {
  createCustomerAddress(
    input: {
      country_code: US
      firstname: "John"
      lastname: "Doe"
      city: "Culver City"
      region: {
        region_code: "CA"
        region_id: 12
        region: "California"
      }
      street: [
        "6161 West Centinella Avenue"
      ]
      postcode: "90230"
      telephone: "+1 555 555 5555"
      default_billing: true
      default_shipping: true
    }
  ) {
    country_code
    firstname
    lastname
    city
    region {
      region
      region_code
    }
    street
    postcode
    telephone
    default_billing
    default_shipping
  }
}

Expected result:
✔️ validation or region ignorance

Actual result:
❌ Region is present in the address
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions