diff --git a/packages/Webkul/Core/src/Core.php b/packages/Webkul/Core/src/Core.php index 82bd7d870..9b868a81e 100644 --- a/packages/Webkul/Core/src/Core.php +++ b/packages/Webkul/Core/src/Core.php @@ -584,8 +584,8 @@ class Core { $collection = []; - foreach ($this->countries() as $country) { - $collection[$country->code] = $this->states($country->code)->toArray(); + foreach ($this->countryStateRepository->all() as $state) { + $collection[$state->country_code][] = $state->toArray(); } return $collection;