Merge pull request woocommerce/woocommerce-admin#2612 from woocommerce/fix/2427
exclude old WC auto-draft orders from import
This commit is contained in:
commit
c31d5eeace
|
@ -86,7 +86,7 @@ class HistoricalDataLayout extends Component {
|
||||||
total={ customersTotal }
|
total={ customersTotal }
|
||||||
/>
|
/>
|
||||||
<HistoricalDataProgress
|
<HistoricalDataProgress
|
||||||
label={ __( 'Orders', 'woocommerce-admin' ) }
|
label={ __( 'Orders and Refunds', 'woocommerce-admin' ) }
|
||||||
progress={ ordersProgress }
|
progress={ ordersProgress }
|
||||||
total={ ordersTotal }
|
total={ ordersTotal }
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -365,7 +365,7 @@ class WC_Admin_Reports_Sync {
|
||||||
$count = $wpdb->get_var(
|
$count = $wpdb->get_var(
|
||||||
"SELECT COUNT(*) FROM {$wpdb->posts}
|
"SELECT COUNT(*) FROM {$wpdb->posts}
|
||||||
WHERE post_type IN ( 'shop_order', 'shop_order_refund' )
|
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}"
|
{$where_clause}"
|
||||||
); // WPCS: unprepared SQL ok.
|
); // WPCS: unprepared SQL ok.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue