diff --git a/Model/Client/Orders.php b/Model/Client/Orders.php index fe796344c80..d4d16477995 100644 --- a/Model/Client/Orders.php +++ b/Model/Client/Orders.php @@ -744,7 +744,7 @@ public function createOrderRefund(Order\Creditmemo $creditmemo, Order $order) * Check if Shipping Fee needs to be refunded. * Throws exception if Shipping Amount of credit does not match Shipping Fee of paid orderLine. */ - $addShippingToRefund = null; + $addShippingToRefund = false; $shippingCostsLine = $this->orderLines->getShippingFeeItemLineOrder($orderId); if ($shippingCostsLine->getId() && $shippingCostsLine->getQtyRefunded() == 0) { if ($creditmemo->getShippingAmount() > 0) { @@ -757,7 +757,7 @@ public function createOrderRefund(Order\Creditmemo $creditmemo, Order $order) } } - $shouldRefund = $addShippingToRefund || !$creditmemo->getAllItems(); + $shouldRefund = $addShippingToRefund || $creditmemo->getAllItems(); if (!$shouldRefund || $this->adjustmentFee->doNotRefundInMollie()) { return $this; }