exclude old WC auto-draft orders from import

This commit is contained in:
Ron Rennick 2019-07-08 15:36:12 -03:00
parent 2260e60453
commit 5e757d2f70
1 changed files with 1 additions and 1 deletions

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.