Closed. This question is off-topic. It is not currently accepting answers.
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this question
I want to attach an PDF file with "customer-processing-order.php" email template when any customer place an order.
Please find below my code that i already used to attach an attachment with above email.
add_filter( 'woocommerce_email_attachments', 'attach_terms_conditions_pdf_to_email', 10, 3);
function attach_terms_conditions_pdf_to_email ( $attachments , $id, $object ) {
$pdf_path = 'pdf_file_path.pdf';
$attachments[] = $pdf_path;
return $attachments;
}