Skip to content

Commit

Permalink
Fix - new customer flag when the order placed on the same day (#1855)
Browse files Browse the repository at this point in the history
  • Loading branch information
lguichard authored Jul 8, 2024
1 parent 2aa754f commit 5a9569d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/Jobs/Orders/MarkAsNewCustomer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 5a9569d

Please sign in to comment.