title: WooCommerce: Auto complete paid orders
body: <p>Normally wooCommerce should autocomplete orders for virtual products. But it doesn't and this is a real problem, even a BUG like.</p>
  
  <p>So at this point you can find somme helpful things(but not really convenient):</p>
  
  <blockquote>
    <p><strong>1) A snippet code</strong> (that you can find in wooCommerce docs):</p>
  
  <pre><code>/**
   * Auto Complete all WooCommerce orders.
   */
  add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order');
  function custom_woocommerce_auto_complete_order( $order_id ) {
      if ( ! $order_id ) {
          return;
      }
  
      $order = wc_get_order( $order_id );
      $order-&gt;update_status( 'completed' );
  }
  </code></pre>
    
    <p>But this snippet does not work for <strong>BACS*</strong>, <strong>Pay on delivery</strong> and <strong>Cheque</strong> payment methods. It's ok for Paypal and Credit Card gateways payment methods.</p>
  </blockquote>
  
  <p>*BACS <em>is a Direct Bank transfer payment method</em></p>
  
  <p>And …</p>
  
  <blockquote>
    <p><strong>2) A plugin:</strong> WooCommerce Autocomplete Orders</p>
    
    <p>This plugin works for all payment methods, <strong>but not for</strong> other <strong>Credit Card gateways payment methods</strong>.</p>
  </blockquote>
  
  <p>My question:</p>
  
  <p>Using (as a base) the wooCommerce snippet in point 1:</p>
  
  <p><strong>How can I implement conditional code based on woocommerce payment methods?</strong> </p>
  
  <p>I mean something like: if the payment methods aren't "BACS", "Pay on delivery" and "Cheque" then apply the snippet code (update status to "completed" for paid orders concerning virtual products).</p>
  
  <p>Some help will be very nice.</p>