Skip to content

Region field visible for Country when "Allow to Choose State if It is Optional for Country" is disabled #30747

Closed
@mweiss-quotient

Description

@mweiss-quotient

Preconditions (*)

  1. Magento 2.4.1 and 2.4-develop
  2. PHP 7.4

Steps to reproduce (*)

  1. In General Settings configure Default Country that doesn't support States (eg. Czech Republic)
  2. In General Settings configure Allowed countries same as Default Country
  3. Make sure that your Default Country isn't selected in State is Required for field
  4. In General Settings configure Allow to Choose State if It is Optional for Country to NO
  5. Navigate to storefront as a guest and add product to cart.
  6. Go to Checkout page.

Expected result (*)

  1. Default Country is automatically selected in shipping address form and region field is hidden.

Actual result (*)

  1. Default Country is automatically selected in shipping address form but region input field is visible.

Additional info from Engcom

According to the documentation, when Allow to Choose State if It is Optional for Country is set to No - In countries where the state field is not required, omits the State field.

  1. In General Settings set country that doesn't support States for Default Country and Allowed countries settings (eg. Czech Republic)
    Default and allow
  2. Make sure that your Default Country isn't selected in State is Required for field
    state as required
  3. In General Settings set Allow to Choose State if It is Optional for Country to NO
    Allow to choose
  4. Navigate to storefront as a guest and add product to cart.
  5. Go to Checkout page.

Actual result
Default Country is automatically selected in shipping address form but region input field is visible.
Store

Metadata

Metadata

Assignees

Labels

Component: CheckoutComponent: ShippingIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions