• Hi,

    I found this code: (source: http://bryceadams.com/add-pdf-woocommerce-order-email/)

    add_filter( 'woocommerce_email_attachments', 'attach_terms_conditions_pdf_to_email', 10, 3);
    function attach_terms_conditions_pdf_to_email ( $attachments, $status , $order ) {
    $allowed_statuses = array( 'new_order', 'customer_invoice', 'customer_processing_order', 'customer_completed_order' );
    if( isset( $status ) && in_array ( $status, $allowed_statuses ) ) {
    $your_pdf_path = get_template_directory() . '/terms.pdf';
    $attachments[] = $your_pdf_path;
    }
    return $attachments;
    }

    but I cant get it working.

    Is it possible to alter the code, so I can attach 2 files when the emails is send?

    Thanks in advance.

    Kind regards,
    Frederik

    https://wordpress.org/plugins/woocommerce/

Viewing 14 replies - 1 through 14 (of 14 total)
Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Is it possible to attach 2 files when WooCommerce is sending email?’ is closed to new replies.