I found the problem. I have a wc-proccssing-payed status in my woocommerce, which your query does not recognize. I have to add the custom status in your order exist function. Sorry to bother and thank you.
It still does not work. Some of the orders still get imported as new even though I did not edit any order id from export and the order ids are present when I checked.
This reply was modified 5 years, 9 months ago by reinu135.