• Resolved andersjpg

    (@andersjpg)


    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Riaan K.

    (@riaanknoetze)

    Hi there,

    Just to make sure – is the PDF meant to be an invoice that’d dynamically populated with the order contents or will the same PDF be sent to all customers?

    If it’s the latter, have you considered using https://woocommerce.com/products/email-attachments/?

    Missy a11n

    (@m155y5)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to go ahead and mark this thread as resolved. If you have any other questions please feel free to start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Attach PDF to WooCommerce Order Emails’ is closed to new replies.