From 94e15d08302c5e9b1d2cd8a9bfd7c16d9d6290aa Mon Sep 17 00:00:00 2001 From: simon-debruijn Date: Fri, 12 Jul 2024 10:57:44 +0200 Subject: [PATCH] Check if coupon is used by integration instead of distributed --- app/Domain/Integrations/Controllers/IntegrationController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Domain/Integrations/Controllers/IntegrationController.php b/app/Domain/Integrations/Controllers/IntegrationController.php index a35e0b6b6..84a896e42 100644 --- a/app/Domain/Integrations/Controllers/IntegrationController.php +++ b/app/Domain/Integrations/Controllers/IntegrationController.php @@ -365,7 +365,7 @@ private function guardCoupon(Request $request): ?RedirectResponse ]); } - if ($coupon->isDistributed) { + if ($coupon->integrationId !== null) { return Redirect::back()->withErrors(['coupon' => __('errors.coupon.already_used')]); }