Get Invoice location
-
I’m trying to send pdf invoices as attachments to customers using the method wp_mail(). The method will look something like this:
$attachments = array(WP_CONTENT_DIR .'/uploads/2019/08/your-pdf-fine-name.pdf'); $to = [email protected]; $subject = "PDF in wp_mail"; $message = "Please check the attached PDF."; $headers = 'From: [email protected]' . "\r\n"; wp_mail( $to, $subject, $message, $headers, $attachments);
The attachment variable should be equal to the location of the PDF invoice. How do I get the location of an already generated PDF invoice using an order id?
Thanks in advance.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Get Invoice location’ is closed to new replies.