Skip to content

Commit

Permalink
Checking the configurability of the cart item instead of the buyable …
Browse files Browse the repository at this point in the history
…in the OrderFactory
  • Loading branch information
fulopattila122 committed Jun 4, 2024
1 parent 49e9311 commit 24ce558
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 @@ -22,6 +22,7 @@
- `address2`
- `access_code`
- Changed the offline payment gateway's icon from a circle to a plug+x
- Fixed the possible missing configuration copy from cart_items to order_items in the OrderFactory

## 4.0.1
##### 2024-04-25
Expand Down
2 changes: 1 addition & 1 deletion src/Foundation/Factories/OrderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function convertCartItemsToDataArray(CheckoutSubject $cart)
return [
'product' => $item->getBuyable(),
'quantity' => $item->getQuantity(),
'configuration' => $item->getBuyable() instanceof Configurable ? $item->configuration() : null,
'configuration' => $item instanceof Configurable ? $item->configuration() : null,
'adjustments' => $item instanceof Adjustable ? $item->adjustments() : [],
];
})->all();
Expand Down

0 comments on commit 24ce558

Please sign in to comment.