Merge pull request #5068 from devansh-webkul/wishlist_issue
Is Wishlist API Key Fixed #5067
This commit is contained in:
commit
41f74990fe
|
|
@ -14,7 +14,9 @@ class Wishlist
|
|||
{
|
||||
$wishlist = false;
|
||||
|
||||
if ($customer = auth()->guard('customer')->user()) {
|
||||
$guard = request()->has('token') ? 'api' : 'customer';
|
||||
|
||||
if ($customer = auth()->guard($guard)->user()) {
|
||||
$wishlist = $customer->wishlist_items->filter(function ($item) use ($product) {
|
||||
return $item->channel_id == core()->getCurrentChannel()->id && $item->product_id == $product->product_id;
|
||||
})->first();
|
||||
|
|
|
|||
Loading…
Reference in New Issue