We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 124d785 commit eab2af3Copy full SHA for eab2af3
app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php
@@ -302,11 +302,9 @@ protected function setProductLinks(Product $product)
302
unset($linkTypes[$productLink->getLinkType()]);
303
}
304
305
- $isReadOnlyUpSellItems = false;
306
foreach ($linkTypes as $linkType => $readonly) {
307
- $isReadOnlyRelatedItems = $readonly && $linkType === 'related' ||
308
- ($isReadOnlyUpSellItems = $readonly && $linkType === 'upsell');
309
- if ($isReadOnlyRelatedItems && $isReadOnlyUpSellItems) {
+ $isReadOnlyLinks = $readonly && in_array($linkType, ['upsell', 'related']);
+ if ($isReadOnlyLinks) {
310
$productLinks = null;
311
break;
312
} else {
0 commit comments