Skip to content

Commit 68f154e

Browse files
committed
wip
1 parent b1b8686 commit 68f154e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Models/Cart.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function toOrder(): Order
183183
{
184184
$this->getLineItems()->each(function (Item $item): void {
185185
if (! $item->buyable->buyable($this->order)) {
186-
throw new CartException(sprintf('Unable to add [%s] item to the order.', get_class($item->buyable)));
186+
throw new CartException(sprintf('Unable to add [%s] item to the order.', $item->buyable_type));
187187
}
188188
});
189189

@@ -216,6 +216,8 @@ public function toOrder(): Order
216216
//
217217
}
218218

219+
$this->order->refresh();
220+
219221
return $this->order;
220222
}
221223
}

0 commit comments

Comments
 (0)