Choose which customer emails carry the XML under Taxes and emails: Completed order and Customer invoice by default. If the invoice is due at the moment the email goes out, it is made right then, so the attachment is never missing. Buyers can also download their e-invoices and credit notes from the order page in My Account.

The store email E-invoice check failed lists the problems and links to the order. Edit or turn it off under WooCommerce, Settings, Emails.

The orders list has an E-invoice column with the number (a download link) or the status.
