Skip to content

Commit

Permalink
Set orderby to none for order queries where checking if order exist…
Browse files Browse the repository at this point in the history
…s. (#10051)
  • Loading branch information
prettyboymp authored Feb 4, 2025
1 parent 4405c97 commit b8b40ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog/fix-10046-set-orderby-none-for-exist-checks
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Set orderby to `none` for order queries where checking if order exists.
2 changes: 2 additions & 0 deletions includes/class-wc-payments-incentives-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ private function has_wcpay(): bool {
'payment_method' => 'woocommerce_payments',
'return' => 'ids',
'limit' => 1,
'orderby' => 'none',
]
)
) ) {
Expand Down Expand Up @@ -319,6 +320,7 @@ private function get_store_context(): array {
'date_created' => '>=' . strtotime( '-90 days' ),
'return' => 'ids',
'limit' => 1,
'orderby' => 'none',
]
)
),
Expand Down

0 comments on commit b8b40ce

Please sign in to comment.