We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1b8686 commit 68f154eCopy full SHA for 68f154e
1 file changed
src/Models/Cart.php
@@ -183,7 +183,7 @@ public function toOrder(): Order
183
{
184
$this->getLineItems()->each(function (Item $item): void {
185
if (! $item->buyable->buyable($this->order)) {
186
- throw new CartException(sprintf('Unable to add [%s] item to the order.', get_class($item->buyable)));
+ throw new CartException(sprintf('Unable to add [%s] item to the order.', $item->buyable_type));
187
}
188
});
189
@@ -216,6 +216,8 @@ public function toOrder(): Order
216
//
217
218
219
+ $this->order->refresh();
220
+
221
return $this->order;
222
223
0 commit comments