Exclude trashed orders from reports (https://github.com/woocommerce/woocommerce-admin/pull/1464)
This commit is contained in:
parent
fd3da36a2f
commit
3aaf318779
|
@ -417,8 +417,8 @@ class WC_Admin_Reports_Data_Store {
|
|||
* @return array
|
||||
*/
|
||||
protected static function get_excluded_report_order_statuses() {
|
||||
$excluded_statuses = WC_Admin_Settings::get_option( 'woocommerce_excluded_report_order_statuses', array( 'pending', 'failed', 'cancelled' ) );
|
||||
$excluded_statuses[] = 'refunded';
|
||||
$excluded_statuses = WC_Admin_Settings::get_option( 'woocommerce_excluded_report_order_statuses', array( 'pending', 'failed', 'cancelled' ) );
|
||||
$excluded_statuses = array_merge( array( 'refunded', 'trash' ), $excluded_statuses );
|
||||
return apply_filters( 'woocommerce_reports_excluded_order_statuses', $excluded_statuses );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue