Back to Community

Why Your PDF Invoices Aren't Attaching to WooCommerce Emails (And How to Fix It)

Content

One of the most common issues reported by users of the 'PDF Invoices & Packing Slips for WooCommerce' plugin is that PDFs generate correctly but fail to attach to outgoing order emails. This can be a frustrating problem for store owners who rely on automated invoicing.

Based on extensive community discussion and troubleshooting, here are the most frequent causes and their solutions.

1. Third-Party Email Service Restrictions

This is, by far, the most common culprit. Many popular email services like MailPoet, Brevo (Sendinblue), Sendgrid, and others have strict policies or technical limitations regarding email attachments.

  • The Problem: Your SMTP or email marketing service may block attachments entirely, have a strict file size limit, or strip attachments during processing.
  • How to Check: Review your service's documentation for their rules on attachments. Test by sending an email to a Gmail or Outlook address instead of through your third-party service.
  • The Solution: Contact your email service's support to confirm if they allow attachments. You may need to switch to a different SMTP service or use your web host's default mail server.

2. File Permission Errors

The plugin needs to create and store temporary PDF files in a folder within your WordPress uploads directory before it can attach them to an email.

  • The Problem: If this temporary folder does not have the correct write permissions, the PDF cannot be created, and therefore, cannot be attached. You may see a specific error in the plugin's settings about the temp directory.
  • The Solution: Use your hosting control panel's file manager or an FTP client to navigate to /wp-content/uploads/. Find the plugin's temp folder (it looks like wpo_wcpdf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) and set its permissions to 755. If the folder doesn't exist, check that the main uploads folder is writable.

3. Incorrect "Attach To" Settings

The plugin must be explicitly told which WooCommerce emails to attach the PDF to. This is a common source of confusion.

  • The Problem: A customer expects an invoice with their "Order on-hold" email, but the plugin is only set to attach to "Completed order" emails.
  • How to Check: Go to WooCommerce > PDF Invoices > Documents > Invoice and look at the "Attach to:" setting. Ensure the correct email notifications are checked for your needs.
  • The Solution: Select the specific WooCommerce email notifications (e.g., "Processing order," "Completed order") that should include the invoice attachment. Remember, the invoice number is generated when the document is first created, so attaching to "New order" will generate it immediately upon checkout.

4. Plugin or Theme Conflicts

Another plugin, or sometimes your theme, can interfere with how WooCommerce sends emails or how the PDF plugin creates attachments.

  • The Problem: The issue started after installing a new plugin or updating your theme. Emails might send but without the PDF, or you might see critical errors in your WooCommerce logs.
  • How to Check: Follow a standard conflict test:
    1. Switch your theme to a default WordPress theme like Twenty Twenty-Four.
    2. Deactivate all plugins except for WooCommerce and 'PDF Invoices & Packing Slips'.
    3. Test if the invoice attaches to an email. If it works, reactivate your plugins one-by-one, testing after each, to find the culprit.
  • The Solution: If you identify a conflicting plugin, check its settings for any options related to email attachments or WooCommerce emails. If no setting resolves it, you may need to contact the conflicting plugin's developers for support or look for an alternative.

5. Email-Specific Issues (e.g., Hotmail/Outlook)

Some email providers, notably Hotmail and Outlook, have aggressive security filters that can sometimes corrupt emails with attachments or mark them as spam.

  • The Problem: Emails with attachments sent to @hotmail.com or @outlook.com addresses arrive blank or cannot load the PDF.
  • The Solution: This is often a provider-specific issue. Test by sending the email to a different email provider (like Gmail) to confirm the attachment works elsewhere. There may be little you can do on your end besides ensuring your domain's SPF and DKIM records are properly set up to improve email deliverability.

Summary: Your Troubleshooting Checklist

  1. Test with a different email service: Rule out third-party service restrictions first.
  2. Verify folder permissions: Ensure the plugin's temp directory is writable.
  3. Double-check your settings: Confirm the PDF is set to attach to the correct WooCommerce email notifications.
  4. Perform a conflict test: Rule out other plugins or your theme causing the issue.
  5. Check your logs: Look for errors in WooCommerce > Status > Logs that might point to a specific cause.

By methodically working through these common issues, you can almost always identify and resolve why your PDF invoices are not being sent with your WooCommerce order emails.

Related Support Threads Support