From cf24f76c50d86a5e6b17c90d80aaa6d828d24c8c Mon Sep 17 00:00:00 2001 From: Fabian Lauer Date: Thu, 23 Mar 2017 12:34:56 +0100 Subject: [PATCH] Remove redundant check in if-condition Removed the part of an `if`-condition that tests whether a quote is virtual or not. The part that was removed is redundant because of line 43. --- app/code/Magento/Quote/Model/QuoteValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Quote/Model/QuoteValidator.php b/app/code/Magento/Quote/Model/QuoteValidator.php index 96fd742c36972..3d9128efaf07f 100644 --- a/app/code/Magento/Quote/Model/QuoteValidator.php +++ b/app/code/Magento/Quote/Model/QuoteValidator.php @@ -51,7 +51,7 @@ public function validateBeforeSubmit(QuoteEntity $quote) } $method = $quote->getShippingAddress()->getShippingMethod(); $rate = $quote->getShippingAddress()->getShippingRateByCode($method); - if (!$quote->isVirtual() && (!$method || !$rate)) { + if (!$method || !$rate) { throw new \Magento\Framework\Exception\LocalizedException(__('Please specify a shipping method.')); } }