Skip to content

Commit

Permalink
Include transactions in net sales regardless of the transaction's ord…
Browse files Browse the repository at this point in the history
…er status. Changelog.
  • Loading branch information
brianhogg committed Jan 24, 2025
1 parent b42c19e commit 700b248
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .changelogs/fix_date-range-widget-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
significance: patch
type: fixed
links:
- "#2860"
- "#2861"
entry: Sales reporting includes partially refunded transactions, and
transactions from orders regardless of status.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ public function set_query() {
'select' => array(
'orders.ID',
),
'statuses' => array(
'llms-active',
'llms-completed',
'llms-refunded',
),
)
);
$this->query();
Expand Down Expand Up @@ -112,7 +107,7 @@ public function set_query() {
{$txn_meta_join}
JOIN {$wpdb->postmeta} AS sales ON sales.post_id = txns.ID
WHERE
( txns.post_status = 'llms-txn-succeeded' )
( txns.post_status = 'llms-txn-succeeded' OR txns.post_status = 'llms-txn-refunded' )
AND txns.post_type = 'llms_transaction'
AND txns.post_date >= %s
AND txns.post_date < %s
Expand Down

0 comments on commit 700b248

Please sign in to comment.