Closed brianjhanson closed 4 years ago
Thanks for reporting that! I’ve just fixed it for the next release.
You can work around the bug without waiting for the release by just sorting one country in the country list manually within the CP, and same for each group of states inside each country.
To get the fix early, change your craftcms/commerce
requirement in composer.json to:
"require": {
"craftcms/commerce": "dev-develop#fb4cba2f85a36d4a25c3fdd760256d66d8f4bb0a as 3.1.8",
"...": "..."
}
Then run composer update
.
Thanks.
Thanks @lukeholder!
Description I'm not sure if this is really a bug, but the
getAllEnabledStatesAsListGroupedByCountryId
seems to return states in a random order on every refresh.To Reproduce Output `{% dd craft.commerce.states.getAllEnabledStatesAsListGroupedByCountryId %} and refresh. On each refresh the order seems to change.
Video of the output
Expected behavior I expected them to be ordered alphabetically.
Additional info