laravel / cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.
https://laravel.com/docs/cashier-paddle
MIT License
238 stars 57 forks source link

Fix updateQuantity issue - Remove pluck() #223

Closed haszzam closed 9 months ago

haszzam commented 9 months ago

Issue

The updateQuantity() method was failing and throwing the error below.

image

Running pluck(['quantity', 'price_id']) on the result from get(['quantity', 'price_id']) was returning null in the following line $items = $this->items()->get(['quantity', 'price_id'])->pluck(['quantity', 'price_id'])->toArray();

I'm also not sure you could pass and array to pluck, I think this was added by mistake.

Solution

Removed pluck(['quantity', 'price_id'])