Updating WooCommerce Guest Orders
I am pretty sure this works…YMMV – It’s a little brutish, sorry. Create View posts2update AS SELECT p.id, m1.meta_value AS email from ayq_posts p, ayq_postmeta m1, ayq_postmeta m2 WHERE p.ID = m1.post_id and p.ID = m2.post_id AND m1.meta_key = ‘_billing_email’ AND m1.meta_value IS NOT NULL AND m2.meta_key = ‘_customer_user’ AND m2.meta_value = 0 Create View…