Skip to content

Commit 49e464a

Browse files
Fixing the condition in orderItemRepository.countByVariant
Fixing the condition in orderItemRepository.countByVariant (caused incorrect calculations of units sold while elastic popualte)
1 parent 655c733 commit 49e464a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Repository/OrderItemRepository.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(
2525

2626
public function countByVariant(ProductVariantInterface $variant, array $orderStates = []): int
2727
{
28-
if ([] !== $orderStates) {
28+
if ([] === $orderStates) {
2929
$orderStates = [OrderInterface::STATE_CANCELLED, OrderInterface::STATE_CART];
3030
}
3131

0 commit comments

Comments
 (0)