Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix updateQuantity issue - Remove pluck() #223

Closed
wants to merge 1 commit into from
Closed

Fix updateQuantity issue - Remove pluck() #223

wants to merge 1 commit into from

Conversation

haszzam
Copy link

@haszzam haszzam commented Dec 16, 2023

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'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant