From 9a7d88fc35f0d9aa102b0536f9c2f1242c9fcca3 Mon Sep 17 00:00:00 2001 From: Andrew Minion Date: Fri, 3 Dec 2021 12:21:53 -0600 Subject: [PATCH 1/3] fix docs --- src/CartItem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CartItem.php b/src/CartItem.php index 5d183be..ed5e538 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 */ public $options; From 58f8648935e4afbfe5d5dae05e0344e83def74e0 Mon Sep 17 00:00:00 2001 From: Andrew Minion Date: Fri, 10 Dec 2021 10:35:36 -0600 Subject: [PATCH 2/3] add handling for arrays --- src/CartItem.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/CartItem.php b/src/CartItem.php index ed5e538..3c9361e 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 CartItemOptions + * @var CartItemOptions|array */ public $options; @@ -480,7 +480,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, From 605a2ab03a93909e47ca15af7801df46bf528fb3 Mon Sep 17 00:00:00 2001 From: contrib-readme-bot Date: Sun, 12 Dec 2021 14:21:37 +0000 Subject: [PATCH 3/3] contrib-readme-action has updated readme --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) 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 -