From ff8b59ceb17bfb7d05d3935bf94936b61128915b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Bogda=C5=84ski?= Date: Tue, 11 Jul 2023 00:24:20 +0200 Subject: [PATCH] =?UTF-8?q?PB-707=20Naprawi=C4=87=20nieprawid=C5=82owo=20z?= =?UTF-8?q?liczaj=C4=85ce=20si=C4=99=20statystyki=20w=20zak=C5=82adce=20Ra?= =?UTF-8?q?porty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/payments/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/payments/functions.php b/includes/payments/functions.php index 12e811dc05..0b1f10b948 100644 --- a/includes/payments/functions.php +++ b/includes/payments/functions.php @@ -274,7 +274,7 @@ function edd_delete_purchase( $payment_id = 0, $update_customer = true, $delete_ $customer = new EDD_Customer( $customer_id ); - if( $status == 'revoked' || $status == 'publish' ) { + if( $status == 'publish' ) { // Only decrease earnings if they haven't already been decreased (or were never increased for this payment) edd_decrease_total_earnings( $amount ); // Clear the This Month earnings (this_monththis_month is NOT a typo) @@ -701,7 +701,7 @@ function edd_get_earnings_by_date( $day, $month_num, $year = null, $hour = null, 'nopaging' => true, 'year' => $year, 'monthnum' => $month_num, - 'post_status' => array( 'publish', 'revoked' ), + 'post_status' => array( 'publish' ), 'fields' => 'ids', 'update_post_term_cache' => false, 'include_taxes' => $include_taxes, @@ -758,7 +758,7 @@ function edd_get_sales_by_date( $day = null, $month_num = null, $year = null, $h 'nopaging' => true, 'year' => $year, 'fields' => 'ids', - 'post_status' => array( 'publish', 'revoked' ), + 'post_status' => array( 'publish' ), 'update_post_meta_cache' => false, 'update_post_term_cache' => false ); @@ -831,7 +831,7 @@ function edd_is_payment_complete( $payment_id = 0 ) { */ function edd_get_total_sales() { $payments = edd_count_payments(); - return $payments->revoked + $payments->publish; + return $payments->publish; } /**