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 da1a96c commit c720d97Copy full SHA for c720d97
app/code/Magento/Bundle/Model/OptionRepository.php
@@ -160,10 +160,9 @@ public function delete(\Magento\Bundle\Api\Data\OptionInterface $option)
160
*/
161
public function deleteById($sku, $optionId)
162
{
163
- $product = $this->getProduct($sku);
164
- $optionCollection = $this->type->getOptionsCollection($product);
165
- $optionCollection->setIdFilter($optionId);
166
- $hasBeenDeleted = $this->delete($optionCollection->getFirstItem());
+ /** @var \Magento\Bundle\Api\Data\OptionInterface $option */
+ $option = $this->get($sku, $optionId);
+ $hasBeenDeleted = $this->delete($option);
167
168
return $hasBeenDeleted;
169
}
0 commit comments