shipsToCountries provides inaccurate data

The shipsToCountries field on the shop object returns countries that have shipping configured, but are not in an active market.

This leads to countries being listed by this field that are not displayed in the checkout shipping information section.

There is a subtle but important distinction between “shipping coverage” (the countries you have included in your shipping profiles/rates) and “active markets” (the countries/regions that are enabled in your Markets settings).

The shipsToCountries field on the Shop object will return any country/region that has a shipping rate configured—regardless of whether it is currently part of an active market.

Because the checkout process itself only displays shipping options for countries belonging to active markets, you’ll see a discrepancy if you have a shipping rate for a country but have not included that country in an active market.

@daniel, I feel like you just reiterated exactly what I said in my original post.

My point is that shipsToCountries is useless as is.

I feel like the fact that it returns countries that have shipping configured, but that are not in markets should be considered a bug. If any developer uses the values returned without filtering them it will lead to customers not being able to complete checkout.

@Garret why do you have shipping configured in zones which are not in active markets? In which scenario this is needed?

Not me, merchants do.

My guess is they start configuring a new market and don’t finish/activate the market right away.

Even best case scenario, a merchant starts configuring a new market and completes it in the same session. There is still going to be a non-zero amount of time the shipsToCountries attribute is giving bad data.