Attach PDF to WooCommerce Order Emails
-
i need to find out the snippet for when a customer makes a new order and get the invoice mail or new order mail. that an pdf gets attach to it
i have this:
add_filter( ‘woocommerce_email_attachments’, ‘attach_pdf_file_to_customer_completed_email’, 10, 3);
function attach_pdf_file_to_customer_completed_email( $attachments, $email_id, $order ) {
if( isset( $email_id ) && $email_id === ‘customer_new_order‘ ){
$attachments[] = get_stylesheet_directory() . ‘/HANDELSBETINGELSER.pdf’; // Child theme
}
return $attachments;
}the “customer_new_order” is what i take i need to find out what the woo official snippet is for a new order mail
The topic ‘Attach PDF to WooCommerce Order Emails’ is closed to new replies.