Skip to content

Commit

Permalink
fix: Use field translator for product fields (issue magento#39277)
Browse files Browse the repository at this point in the history
Fixing issue magento#39277
  • Loading branch information
pmzandbergen authored Nov 4, 2024
1 parent 6acfd6a commit 751a827
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ public function getProductFieldsFromInfo(ResolveInfo $info, string $productNodeN
if ($node->name->value !== $productNodeName) {
continue;
}
$queryFields = $this->attributesJoiner->getQueryFields($node, $info);
$fieldNames[] = $queryFields;
$queryFields = array_map(function (string $fieldName): string {
return $this->fieldTranslator->translate($fieldName);
}, $this->attributesJoiner->getQueryFields($node, $info));
$fieldNames[] = $queryFields;
}

return array_merge(...$fieldNames);
Expand Down

0 comments on commit 751a827

Please sign in to comment.