/** * @inheritdoc */ public function delete(StockItemInterface $stockItem) { try { $this->resource->delete($stockItem); } catch (\Exception $exception) { throw new CouldNotDeleteException(__($exception->getMessage())); } return true; }