File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,12 @@ public function transform(): \Generator
3232 $ lookup = $ this ->cache ->get (sprintf ($ this ->cacheKey , $ line [$ this ->mappingField ]));
3333
3434 if ($ lookup === null ) {
35- $ lookup = $ this ->client ->catalogCategoryAttributeOptionManagementV1GetItemsGet (
35+ $ results = $ this ->client ->catalogProductAttributeOptionManagementV1GetItemsGet (
3636 attributeCode: $ this ->attributeCode ,
3737 );
3838
39+ $ lookup = array_values (array_filter ($ results , fn (object $ item ) => $ item ->getValue () === $ line [$ this ->mappingField ]))[0 ];
40+
3941 if (!$ lookup instanceof \Kiboko \Magento \V2_1 \Model \EavDataAttributeOptionInterface
4042 && !$ lookup instanceof \Kiboko \Magento \V2_2 \Model \EavDataAttributeOptionInterface
4143 && !$ lookup instanceof \Kiboko \Magento \V2_3 \Model \EavDataAttributeOptionInterface
You can’t perform that action at this time.
0 commit comments