Merge pull request woocommerce/woocommerce-admin#2612 from woocommerce/fix/2427

exclude old WC auto-draft orders from import
This commit is contained in:
Ron Rennick 2019-07-09 13:05:36 -03:00 committed by GitHub
commit c31d5eeace
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ class HistoricalDataLayout extends Component {
total={ customersTotal }
/>
<HistoricalDataProgress
label={ __( 'Orders', 'woocommerce-admin' ) }
label={ __( 'Orders and Refunds', 'woocommerce-admin' ) }
progress={ ordersProgress }
total={ ordersTotal }
/>

View File

@ -365,7 +365,7 @@ class WC_Admin_Reports_Sync {
$count = $wpdb->get_var(
"SELECT COUNT(*) FROM {$wpdb->posts}
WHERE post_type IN ( 'shop_order', 'shop_order_refund' )
AND post_status NOT IN ( 'auto-draft', 'trash' )
AND post_status NOT IN ( 'wc-auto-draft', 'auto-draft', 'trash' )
{$where_clause}"
); // WPCS: unprepared SQL ok.