From a43546141fa31b958549be04cb0edd127414331c Mon Sep 17 00:00:00 2001 From: Aidas Klimas Date: Tue, 22 Oct 2024 13:26:51 +0800 Subject: [PATCH] remove cart check exception --- packages/core/src/Models/Cart.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/core/src/Models/Cart.php b/packages/core/src/Models/Cart.php index 3f75b1005f..3e48a1bb39 100644 --- a/packages/core/src/Models/Cart.php +++ b/packages/core/src/Models/Cart.php @@ -434,14 +434,6 @@ public function clear(): Cart */ public function associate(LunarUser $user, string $policy = 'merge', bool $refresh = true): Cart { - if ($this->customer()->exists()) { - if (! $user->query() - ->whereHas('customers', fn ($query) => $query->where('customer_id', $this->customer->id)) - ->exists()) { - throw new Exception('Invalid user'); - } - } - return app( config('lunar.cart.actions.associate_user', AssociateUser::class) )->execute($this, $user, $policy)