Skip to content

Commit

Permalink
Merge branch '5.x' of github.com:craftcms/commerce into 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeholder committed Oct 23, 2024
2 parents 4f5bfd8 + e3a9a0d commit 3d74b1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Fixed an SQL error that occurred when duplicating variants. ([#3727](https://github.com/craftcms/commerce/issues/3727))
- Fixed a PHP error that could occur when completing an order. ([#3733](https://github.com/craftcms/commerce/issues/3733))

## 5.2.0 - 2024-10-16

Expand Down
2 changes: 1 addition & 1 deletion src/services/LineItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ public function eagerLoadLineItemsForOrders(array $orders): array
public function orderCompleteHandler(LineItem $lineItem, Order $order): void
{
// Called the after order complete method for the purchasable if there is one
if ($lineItem->getPurchasable()) {
if ($lineItem->type === LineItemType::Purchasable && $lineItem->getPurchasable()) {
$lineItem->getPurchasable()->afterOrderComplete($order, $lineItem);
}

Expand Down

0 comments on commit 3d74b1f

Please sign in to comment.