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 = [])
95
95
{
96
96
/** @var OptionInterface[] $bundleProductOptions */
97
97
$ bundleProductOptions = $ entity ->getExtensionAttributes ()->getBundleProductOptions () ?: [];
98
- $ existingBundleProductOptions = $ this ->optionRepository ->getList ($ entity ->getSku ());
99
98
//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 )) {
103
100
return $ entity ;
104
101
}
105
102
103
+ $ existingBundleProductOptions = $ this ->optionRepository ->getList ($ entity ->getSku ());
106
104
$ existingOptionsIds = !empty ($ existingBundleProductOptions )
107
105
? $ this ->getOptionIds ($ existingBundleProductOptions )
108
106
: [];
You can’t perform that action at this time.
0 commit comments