title: Add the product name to the email subject in WooCommerce
body: <p>How can I add the product name in the subject line of this email. is there a list of the available filters for the email subject lines? I'd like to be able to do this without having to write custom php. I'm looking to do something like this:</p>
  
  <p>Completed Order - [{product_name}] ({order_number}) - {order_date}
  Below code tried and added in <code>functions.php</code> but subject is not displaying:</p>
  
  <pre><code>add_filter( 'woocommerce_email_subject_customer_completed_order', 'customer_completed_order_subject', 10, 2 ); 
  function customer_completed_order_subject($string,$order){
  $fname = $order-&gt;billing_first_name;
  $lanme = $order-&gt;billing_last_name;
  $email = $order-&gt;billing_email;
  $items = $order-&gt;get_items();
  foreach($items as $meta_key =&gt; $items){
      $product_name = $items['name'];
      $product_id = $items['product_id'];
  }
  $subject_line = get_field('email_subject',$product_id);
  $subject_line = str_replace('{product}',$product_name,$subject_line);
  $subject_line = str_replace('{biller_fname}',$fname,$subject_line);
  $subject_line = str_replace('{biller_lastname}',$lanme,$subject_line);
  $subject_line = str_replace('{biller_email}',$email,$subject_line);
  $subject_line = str_replace('{blog_name}',get_bloginfo('name'),$subject_line);
  return $subject_line;
  }
  </code></pre>