• Resolved trupsch

    (@trupsch)


    The pdf invoices that are being sent with the order complete email are saved in /uploads/wpo_wcpdf/attachments and are not deleted anymore automatically after the mail is sent.

    I’m not sure what the problem here might be. Maybe this commented code – found in class-wcpdf-main.php – is part of it:

    // scheduled attachments cleanup – disabled for now
    // add_action( ‘wp_scheduled_delete’, array( $this, ‘attachments_cleanup’) );

    But since I can’t find anybody else complaining about it, i fear i’m the only one with this problem.

    Maybe you could have a look and clear this up?
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hello Trupsch,
    That’s correct. There is currently no reliable way to determine whether an email has been sent out by WooCommerce (especially after WooCommerce 3.0 introduced deferred emailing). The plugin used to delete the attachments from previous emails every time a new email was sent (so not, as you assumed after the email was sent), but this sometimes resulted in attachments being deleted before the email with this attachment was sent out.

    The attachments cleanup is not implemented yet as this is quite tricky to implement reliably. But it’s certainly high on our feature list for a future release in the coming months.
    Until that’s implemented you can find a button to delete the files in the temporary folder in the Status tab of the PDF Invoice settings.

    Hope that helps!
    Ewout

    Thread Starter trupsch

    (@trupsch)

    Hi Ewout,

    Thanks for the super quick response and for clearing this up!
    Using the button in the backend to remove the temporary files worked well.

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PDF e-mail attachments are not being deleted’ is closed to new replies.