title: Woocommerce - How to send custom emails based on payment type
body: <p>Here is the problem. My woocommerce website has 3 different payment options - </p>
  
  <ul>
  <li>Check Payment</li>
  <li>Western Union</li>
  <li>Cash On Delivery </li>
  </ul>
  
  <p>If my buyer checkout with "Check Payment" I want to send him an automated email that outlines the steps to make a check payment. 
  If he checkout with "Western Union" I want to email him my Western Union information as an automated email. 
  Another automated email should be send for Cash On Delivery. </p>
  
  <p>Usually in Woocommerce you have a single email sent to customer for all completed orders, in my case I need 3 different emails depending on the payment option. </p>
  
  <p>So I started using this tutorial to make a custom email - <a href="https://www.skyverge.com/blog/how-to-add-a-custom-woocommerce-email/" rel="nofollow">https://www.skyverge.com/blog/how-to-add-a-custom-woocommerce-email/</a> </p>
  
  <p>The tutorial above is used to make custom emails for expedited shipping. This is the line of code used for the same from the tutorial - </p>
  
  <pre><code>// bail if shipping method is not expedited
  if ( ! in_array( $this-&gt;object-&gt;get_shipping_method(), array( 'Three Day Shipping', 'Next Day Shipping' ) ) )
      return;
  </code></pre>
  
  <p>What will the line of code be if I want to check what the payment method is? 
  I want to check if the payment method is "Check Payment" so that I can send him a custom email. </p>
  
  <p>Please let me know if you have any idea.</p>