The email log shows the sent mail without an error. And there is also an invoice attached to this mail. But this attachment does not arrive in my email client.
This means that the email leaves WordPress correctly with attachment and the error of not including the attachment in the actual email happens in your email process. Are you using any plugins to handle email sending? If not, strongly recommended as per the WooCommerce email FAQ, if yes – which one do you use?
And I get an 403 forbidden notice when I try to open the invoice from the backend. Which might be because of the .htaccess in the /wp-content/uploads/wpo_wcpdf/attachments/ directory.
Correct, this is indeed because of the .htaccess
and is unrelated to the issue at hand because the attachment is loaded server site via the absolute path (rather than a from a frontend URL which is restricted by the .htaccess
).