diff --git a/packages/Webkul/Category/src/Repositories/CategoryRepository.php b/packages/Webkul/Category/src/Repositories/CategoryRepository.php index e6398b52a..27e8f14ba 100755 --- a/packages/Webkul/Category/src/Repositories/CategoryRepository.php +++ b/packages/Webkul/Category/src/Repositories/CategoryRepository.php @@ -284,11 +284,13 @@ class CategoryRepository extends Repository foreach ($attributeNames as $attributeName) { foreach (core()->getAllLocales() as $locale) { - foreach ($model->translatedAttributes as $attribute) { - if ($attribute === $attributeName) { - $data[$locale->code][$attribute] = isset($data[$requestedLocale][$attribute]) - ? $data[$requestedLocale][$attribute] - : $data[$data['locale']][$attribute]; + if ($requestedLocale == $locale->code) { + foreach ($model->translatedAttributes as $attribute) { + if ($attribute === $attributeName) { + $data[$locale->code][$attribute] = isset($data[$requestedLocale][$attribute]) + ? $data[$requestedLocale][$attribute] + : $data[$data['locale']][$attribute]; + } } } }