File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
app/code/Magento/Bundle/Model Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -173,13 +173,11 @@ public function saveChild(
173173 )
174174 );
175175 }
176- $ linkField = $ this ->metadataPool ->getMetadata (ProductInterface::class)->getLinkField ();
177176 $ selectionModel = $ this ->mapProductLinkToBundleSelectionModel (
178177 $ selectionModel ,
179178 $ linkedProduct ,
180179 $ product ,
181- (int )$ linkProductModel ->getId (),
182- $ linkField
180+ (int )$ linkProductModel ->getId ()
183181 );
184182
185183 try {
@@ -256,9 +254,9 @@ private function mapProductLinkToBundleSelectionModel(
256254 Selection $ selectionModel ,
257255 LinkInterface $ productLink ,
258256 ProductInterface $ parentProduct ,
259- int $ linkedProductId ,
260- string $ linkField
257+ int $ linkedProductId
261258 ): Selection {
259+ $ linkField = $ this ->metadataPool ->getMetadata (ProductInterface::class)->getLinkField ();
262260 $ selectionModel ->setProductId ($ linkedProductId );
263261 $ selectionModel ->setParentProductId ($ parentProduct ->getData ($ linkField ));
264262 if ($ productLink ->getSelectionId () !== null ) {
@@ -357,8 +355,7 @@ public function addChild(
357355 $ selectionModel ,
358356 $ linkedProduct ,
359357 $ product ,
360- (int )$ linkProductModel ->getEntityId (),
361- $ linkField
358+ (int )$ linkProductModel ->getEntityId ()
362359 );
363360
364361 $ selectionModel ->setOptionId ($ optionId );
You can’t perform that action at this time.
0 commit comments