public function isValidBasketElement(BasketElementInterface $basketElement) { $product = $basketElement->getProduct(); if (!$product instanceof ProductInterface) { return false; } return true; }