To generate an invoice, go to WooCommerce > Order. Click on an order and you can see the invoice in the right section of the screen. In the Create PDF section, you can see the options for generating the PDF invoices and packing slips. Once generated, you can attach the invoice to customer-focused emails.