Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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( $email_id === 'customer_processing_order' ){
- $attachments[] = generatePDF2( $order, get_current_user_id() );
- }
- return $attachments;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement