Skip to content

Commit

Permalink
Merge pull request #5307 from magento-mpi/MC-18452
Browse files Browse the repository at this point in the history
MPI-PR-STORY-2020-02-11
  • Loading branch information
viktym authored Feb 14, 2020
2 parents e280215 + f9cdac2 commit 79ab7c8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
\Magento\Catalog\Model\Product::class
);
$product = $product->loadByAttribute('sku', 'simple_product_' . $option->getId());
if ($product->getId()) {
if ($product instanceof \Magento\Catalog\Model\Product && $product->getId()) {
$product->delete();
}
}
Expand Down

0 comments on commit 79ab7c8

Please sign in to comment.