Skip to content

Commit 24a690d

Browse files
author
Oleksii Korshenko
authored
MAGETWO-70033: Allow USPS Shipping Methods Without ExtraServices #7729
2 parents ee1628a + ae01430 commit 24a690d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/code/Magento/Usps/Model/Carrier.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,6 +2067,11 @@ protected function _parseZip($zipString, $returnFull = false)
20672067
*/
20682068
private function isServiceAvailable(\SimpleXMLElement $service)
20692069
{
2070+
// Allow services which which don't provide any ExtraServices
2071+
if(empty($service->ExtraServices->children()->count())) {
2072+
return true;
2073+
}
2074+
20702075
foreach ($service->ExtraServices->children() as $child) {
20712076
if (filter_var($child->Available, FILTER_VALIDATE_BOOLEAN)) {
20722077
return true;

0 commit comments

Comments
 (0)