From f851d5b1650c4e7042deacce8dac3f33f298f363 Mon Sep 17 00:00:00 2001 From: Kevin Becker Date: Mon, 29 Jun 2026 17:57:04 +0000 Subject: [PATCH] fix(core): ensure generated time values are correct type. Fix for #2524. CustomerGroup query scope contained a type mismatch when default values are generated. See: `HasCustomerGroups::applyCustomerGroupScope`. --- packages/core/src/Base/Traits/HasCustomerGroups.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/Base/Traits/HasCustomerGroups.php b/packages/core/src/Base/Traits/HasCustomerGroups.php index 0fd43e1eef..02d899cb22 100644 --- a/packages/core/src/Base/Traits/HasCustomerGroups.php +++ b/packages/core/src/Base/Traits/HasCustomerGroups.php @@ -141,11 +141,11 @@ public function scopeCustomerGroup($query, CustomerGroupContract|iterable|null $ } if (! $startsAt) { - $startsAt = now(); + $startsAt = now()->toDateTime(); } if (! $endsAt) { - $endsAt = now()->addSecond(); + $endsAt = now()->addSecond()->toDateTime(); } return $this->applyCustomerGroupScope($query, $groupIds, $startsAt, $endsAt);