Skip to content

Commit

Permalink
Merge pull request #167 from bold-commerce/optimize-performance
Browse files Browse the repository at this point in the history
Optimize performance.
  • Loading branch information
p-bystritsky authored Oct 26, 2023
2 parents 394d793 + ce91998 commit b76ab0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Model/Quote/Result/Builder/ExtractShippingMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public function __construct(ShippingMethodConverter $shippingMethodConverter)
public function extract(CartInterface $quote): array
{
$shippingMethods = [];
if ($quote->isVirtual()) {
return [];
}
$quote->getShippingAddress()->requestShippingRates();
$shippingRates = $quote->getShippingAddress()->getGroupedAllShippingRates();
$shippingMethodSet = [];
Expand All @@ -51,6 +54,7 @@ public function extract(CartInterface $quote): array
);
}
}

return $shippingMethods;
}
}

0 comments on commit b76ab0d

Please sign in to comment.