Service/OrderVirtualizationManager.php
public function calculVirtualization(BaseOrderInterface $order, $exclusive = true)
    {
        $isVirtual = count($order->getOrderElements()) > 0;
        $containsVirtual = false;

        /** @var OrderElement $element */
        foreach ($order->getOrderElements() as $element) {
            if ($element->getProduct() instanceof VirtualProductInterface) {
                $containsVirtual = true;
            } else {
                $isVirtual = false;
            }
        }

        return $exclusive ? $isVirtual : $containsVirtual;
    }
public function calculVirtualization(BaseOrderInterface $order, $exclusive = true)
    {
        $isVirtual = count($order->getOrderElements()) > 0;
        $containsVirtual = false;

        /** @var OrderElement $element */
        foreach ($order->getOrderElements() as $element) {
            if ($element->getProduct() instanceof VirtualProductInterface) {
                $containsVirtual = true;
            } else {
                $isVirtual = false;
            }
        }

        return $exclusive ? $isVirtual : $containsVirtual;
    }
@param BaseOrderInterface $order
@param bool               $exclusive

@return bool