title: Woocommerce send PDF attachments in order email only for 2 products
body: <p>In woocommerce, I've got 2 products which has product instructions PDF.</p>
  
  <p>If customer buys any of those 2 products, I want to send its PDF along with order confirmation email.</p>
  
  <p>Right now I'm using this code to send PDF with order confirmation email -</p>
  
  <pre><code>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 ) &amp;&amp; in_array ( $status, $allowed_statuses ) ) {
           $your_pdf_path = get_template_directory() . '/media/test1.pdf'; 
           $attachments[] = $your_pdf_path; 
      } 
  return $attachments; 
  }
  </code></pre>
  
  <p>But this sends PDF to all order email.
  I want to send PDF only when customer has bought one of those 2 products.</p>
  
  <p>I think I need to add condition with product id or something.</p>