Hi @pmcelwee,
Sorry for the inconvenience caused.
We will look into it and fix it in the upcoming update.
Thanks for looking into it, though while I’m glad it will be fixed for other users, to be honest, an update won’t solve my issue, since my import is complete. Any clues on how to fix it now would be much appreciated!
The problem is that the import didn’t add meta_data to the order with the key _order_key. (It *did* correctly add an order key to the order itself.)
For others who may come across this, I was able to fix it with this SQL statement, which fixed over 59,000 orders in about 33 seconds (the post_password column is where Woocommerce stores the order_key):
INSERT INTO wp_postmeta(post_id, meta_key, meta_value)
SELECT
wp_posts.ID,
'_order_key',
wp_posts.post_password
FROM wp_posts
WHERE post_type = 'shop_order'
AND NOT EXISTS(
SELECT 1
FROM wp_postmeta
WHERE post_id = wp_posts.ID AND meta_key = '_order_key'
)
-
This reply was modified 3 years, 11 months ago by
pmcelwee.
-
This reply was modified 3 years, 11 months ago by
pmcelwee.
-
This reply was modified 3 years, 11 months ago by
pmcelwee.
Hi @pmcelwee,
Happy to see you have found a solution and that you have shared it here so that others would benefit from it.
Have a good day!