Skip to content

Commit

Permalink
check subject and attribute set before continuing with interceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
patrikpihlstrom committed Oct 20, 2017
1 parent 07a95cc commit 58b9536
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public function aroundDelete(
callable $proceed,
AttributeSetInterface $attributeSet
) {
if (!isset($subject) || !$attributeSet->getAttributeSetId())
{
return false;
}

// Get the product ids
$ids = $this->productCollection->addFieldToFilter('attribute_set_id', $attributeSet->getAttributeSetId())
->getAllIds();
Expand Down

0 comments on commit 58b9536

Please sign in to comment.