diff --git a/packages/core/src/Jobs/Orders/MarkAsNewCustomer.php b/packages/core/src/Jobs/Orders/MarkAsNewCustomer.php index cbb1545c28..4bbf234522 100644 --- a/packages/core/src/Jobs/Orders/MarkAsNewCustomer.php +++ b/packages/core/src/Jobs/Orders/MarkAsNewCustomer.php @@ -70,7 +70,7 @@ public function handle() "{$ordersTable}.id", '=', 'order_id' - )->whereDate('placed_at', '<', $order->placed_at ?: $order->created_at)->first(); + )->where('placed_at', '<', $order->placed_at ?: $order->created_at)->first(); $order->new_customer = ! $previousOrder; $order->saveQuietly();