Skip to content

Commit 2cca27d

Browse files
author
Stanislav Idolov
authored
ENGCOM-2877: Fix for ProductLink - setterName was incorrectly being set #17774
2 parents 2f8a69b + facdc1a commit 2cca27d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Model/ProductLink/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public function getList(\Magento\Catalog\Api\Data\ProductInterface $product)
178178
foreach ($item['custom_attributes'] as $option) {
179179
$name = $option['attribute_code'];
180180
$value = $option['value'];
181-
$setterName = 'set'.ucfirst($name);
181+
$setterName = 'set'.str_replace('_', '', ucwords($name, '_'));
182182
// Check if setter exists
183183
if (method_exists($productLinkExtension, $setterName)) {
184184
call_user_func([$productLinkExtension, $setterName], $value);

0 commit comments

Comments
 (0)