Wrong state/province in checkout page when using prefilled cart URL

I have my prefilled cart URL with items and sample customer address with state but it renders wrong State.

This is the URL

/cart/48857009291551:2?checkout[email]=JoneDoe@gmail.com&checkout[shipping_address][first_name]=Jone&checkout[shipping_address][last_name]=Doe&checkout[shipping_address][address1]=207E 1st STREET&checkout[shipping_address][city]=ACKWORTH&checkout[shipping_address][province]=Iowa&checkout[shipping_address][zip]=50001

This is what it shows on checkout page:

I use Iowa address but it renders “State: Texas”.

Anyone know why it doesn’t pre-fill the State provided through the URL?

Missing Country Parameter:

  • The original URL does not include the checkout[shipping_address][country] parameter, which is necessary for the server to correctly interpret the state.

Incorrect Use of Province:

  • The original URL uses checkout[shipping_address][province]=Iowa. This should be changed to checkout[shipping_address][state]=IA to match the required format and use the state code.

Here is the corrected url:

/cart/48857009291551:2?checkout[email]=JoneDoe@gmail.com&checkout[shipping_address][first_name]=Jone&checkout[shipping_address][last_name]=Doe&checkout[shipping_address][country]=US&checkout[shipping_address][address1]=207E 1st STREET&checkout[shipping_address][city]=ACKWORTH&checkout[shipping_address][state]=IA&checkout[shipping_address][zip]=50001