File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Catalog/Model/ProductLink
GroupedProduct/Model/Product/Initialization/Helper/ProductLinks/Plugin Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 10
10
use Magento \Catalog \Api \Data \ProductLinkExtensionFactory ;
11
11
use Magento \Catalog \Model \Product \Initialization \Helper \ProductLinks as LinksInitializer ;
12
12
use Magento \Catalog \Model \Product \LinkTypeProvider ;
13
+ use Magento \Framework \Api \SimpleDataObjectConverter ;
13
14
use Magento \Framework \Exception \CouldNotSaveException ;
14
15
use Magento \Framework \Exception \NoSuchEntityException ;
15
16
use Magento \Framework \EntityManager \MetadataPool ;
@@ -170,7 +171,7 @@ public function getList(\Magento\Catalog\Api\Data\ProductInterface $product)
170
171
foreach ($ item ['custom_attributes ' ] as $ option ) {
171
172
$ name = $ option ['attribute_code ' ];
172
173
$ value = $ option ['value ' ];
173
- $ setterName = 'set ' . ucfirst ($ name );
174
+ $ setterName = 'set ' . SimpleDataObjectConverter:: snakeCaseToUpperCamelCase ($ name );
174
175
// Check if setter exists
175
176
if (method_exists ($ productLinkExtension , $ setterName )) {
176
177
call_user_func ([$ productLinkExtension , $ setterName ], $ value );
Original file line number Diff line number Diff line change 8
8
use Magento \Catalog \Api \Data \ProductLinkExtensionFactory ;
9
9
use Magento \Catalog \Api \Data \ProductLinkInterfaceFactory ;
10
10
use Magento \Catalog \Api \ProductRepositoryInterface ;
11
+ use Magento \Framework \Api \SimpleDataObjectConverter ;
11
12
use Magento \Framework \Exception \NoSuchEntityException ;
12
13
use Magento \GroupedProduct \Model \Product \Type \Grouped as TypeGrouped ;
13
14
@@ -111,7 +112,7 @@ public function beforeInitializeLinks(
111
112
foreach ($ linkRaw ['custom_attributes ' ] as $ option ) {
112
113
$ name = $ option ['attribute_code ' ];
113
114
$ value = $ option ['value ' ];
114
- $ setterName = 'set ' . ucfirst ($ name );
115
+ $ setterName = 'set ' . SimpleDataObjectConverter:: snakeCaseToUpperCamelCase ($ name );
115
116
// Check if setter exists
116
117
if (method_exists ($ productLinkExtension , $ setterName )) {
117
118
call_user_func ([$ productLinkExtension , $ setterName ], $ value );
You can’t perform that action at this time.
0 commit comments