diff --git a/src/base/ShippingMethod.php b/src/base/ShippingMethod.php index 487aa5966d..1aa0b90d39 100644 --- a/src/base/ShippingMethod.php +++ b/src/base/ShippingMethod.php @@ -176,7 +176,7 @@ public function getPriceForOrder(Order $order): float $amount = $shippingRule->getBaseRate(); foreach ($order->getLineItems() as $item) { - if ($item->getPurchasable() && !$item->purchasable->hasFreeShipping() && Plugin::getInstance()->getPurchasables()->isPurchasableShippable($item->getPurchasable())) { + if ($item->getPurchasable() && !$item->purchasable->hasFreeShipping() && Plugin::getInstance()->getPurchasables()->isPurchasableShippable($item->getPurchasable(), $order)) { $percentageRate = $shippingRule->getPercentageRate($item->shippingCategoryId); $perItemRate = $shippingRule->getPerItemRate($item->shippingCategoryId); $weightRate = $shippingRule->getWeightRate($item->shippingCategoryId);