diff --git a/README.md b/README.md index bd162ac..3f07ae3 100644 --- a/README.md +++ b/README.md @@ -823,21 +823,28 @@ Cart::add('1239ad0', 'Product 2', 2, 5.95, ['size' => 'large']); Sartoric + + + macbookandrew +
+ Andrew Minion +
+ dtwebuk
Daniel Tomlinson
- + + tkaw220
Edwin Aw
- - + manojo123 @@ -872,15 +879,15 @@ Cart::add('1239ad0', 'Product 2', 2, 5.95, ['size' => 'large']);
Andrés
- + + ganyicz
Filip Ganyicz
- - + guysolamour @@ -915,15 +922,15 @@ Cart::add('1239ad0', 'Product 2', 2, 5.95, ['size' => 'large']);
JT Smith
- + + mrabbani
Mahbub Rabbani
- - + xpundel @@ -958,13 +965,6 @@ Cart::add('1239ad0', 'Product 2', 2, 5.95, ['size' => 'large']);
Pascal Kousbroek
- - - - publiux -
- Raul Ruiz -
diff --git a/src/CartItem.php b/src/CartItem.php index 961523e..d268a41 100644 --- a/src/CartItem.php +++ b/src/CartItem.php @@ -70,7 +70,7 @@ class CartItem implements Arrayable, Jsonable /** * The options for this cart item. * - * @var array + * @var CartItemOptions|array */ public $options; @@ -501,7 +501,9 @@ class CartItem implements Arrayable, Jsonable 'qty' => $this->qty, 'price' => $this->price, 'weight' => $this->weight, - 'options' => $this->options->toArray(), + 'options' => is_object($this->options) + ? $this->options->toArray() + : $this->options, 'discount' => $this->discount, 'tax' => $this->tax, 'subtotal' => $this->subtotal,