Skip to content

Commit

Permalink
Remove redundant check in if-condition
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
FabianLauer authored Mar 23, 2017
1 parent 9ed7c7d commit cf24f76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Quote/Model/QuoteValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.'));
}
}
Expand Down

0 comments on commit cf24f76

Please sign in to comment.