File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
app/code/Magento/Bundle/Model/Product Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -95,14 +95,12 @@ public function execute($entity, $arguments = [])
9595 {
9696 /** @var OptionInterface[] $bundleProductOptions */
9797 $ bundleProductOptions = $ entity ->getExtensionAttributes ()->getBundleProductOptions () ?: [];
98- $ existingBundleProductOptions = $ this ->optionRepository ->getList ($ entity ->getSku ());
9998 //Only processing bundle products.
100- if ($ entity ->getTypeId () !== Type::TYPE_CODE ||
101- (empty ($ bundleProductOptions ) && empty ($ existingBundleProductOptions ))
102- ) {
99+ if ($ entity ->getTypeId () !== Type::TYPE_CODE || empty ($ bundleProductOptions )) {
103100 return $ entity ;
104101 }
105102
103+ $ existingBundleProductOptions = $ this ->optionRepository ->getList ($ entity ->getSku ());
106104 $ existingOptionsIds = !empty ($ existingBundleProductOptions )
107105 ? $ this ->getOptionIds ($ existingBundleProductOptions )
108106 : [];
You can’t perform that action at this time.
0 commit comments