To add an attachment to your order emails, open the functions.php file of your active theme and add the following snippet of code:
add_filter( 'woocommerce_email_attachments', 'webroom_attach_to_wc_emails', 10, 3);
function webroom_attach_to_wc_emails ( $attachments , $email_id, $object ) {
// Avoiding errors and problems
if ( ! is_a( $order, 'WC_Order' ) || ! isset( $email_id ) ) {
return $attachments;
}
$file_path = get_template_directory() . '/file.pdf'; // directory of the current theme
// if you are using a child theme, use this line instead to get the directory
// $file_path = get_stylesheet_directory() . '/file.pdf';
$attachments[] = $file_path;
return $attachments;
}
Reference: https://www.webroom.tech/add-an-attachment-in-woocommerce-emails/