Viewing 1 replies (of 1 total)
  • eLhomer0

    (@elhomer0)

    Hey,

    today I needed to resolve the same problem and it’s very easy.

    Find this in plugin-folder/includes/class-invoice.php

    // Upload invoice
    $mpdf->Output($full_path, 'F');

    After this, add this code and replace with name of your pdf file. It should be located in uploads dir in wp-content.

    $attachmnts = array( $full_path , $uploads_dir."/NAME-OF-YOUR-PDF.pdf" );

    And finally change return $full_path; to return $attachmnts;

Viewing 1 replies (of 1 total)
  • The topic ‘Attach a custom pdf to order’ is closed to new replies.