1

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;

}

closed as off-topic by Krzysiek Dróżdż, shanebp, Max Yudin, Nathan Johnson, Howdy_McGee Feb 12 at 15:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.