Skip to content

Commit

Permalink
Add order context to isPurchasableShippable in class ShippingMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
boboldehampsink authored Sep 18, 2023
1 parent 85ae09a commit 95a510c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base/ShippingMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 95a510c

Please sign in to comment.