Skip to content

Commit

Permalink
Merge branch 'bugfix/support-shipping-costs-refund-only' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
michielgerritsen committed Oct 23, 2023
2 parents fe5b265 + 714e709 commit ff02d10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Model/Client/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,8 @@ public function createOrderRefund(Order\Creditmemo $creditmemo, Order $order)
}
}

if (!$creditmemo->getAllItems() || $this->adjustmentFee->doNotRefundInMollie()) {
$shouldRefund = $addShippingToRefund || !$creditmemo->getAllItems();
if (!$shouldRefund || $this->adjustmentFee->doNotRefundInMollie()) {
return $this;
}

Expand Down
2 changes: 1 addition & 1 deletion Model/OrderLines.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public function getOrderLineByItemId($itemId)
* @param bool $addShipping
* @return array
*/
public function getCreditmemoOrderLines(CreditmemoInterface $creditmemo, $addShipping)
public function getCreditmemoOrderLines(CreditmemoInterface $creditmemo, bool $addShipping): array
{
$orderLines = [];

Expand Down

0 comments on commit ff02d10

Please sign in to comment.