title: how to show a backorder status in woocommerce orders listing
body: <p>We have a lot of backorders in WooCommerce and we would like to be able to sort all the backorders in the orders table.</p>
  
  <p>Currently, we are filtering the orders using these status: Awaiting shipment, Refunded, Cancelled, Completed,  Processing</p>
  
  <p>Please refer to the <a href="https://i.stack.imgur.com/KOrsr.jpg" rel="nofollow noreferrer">screenshot</a></p>
  
  <p>I've searched online and I only found <a href="https://wordpress.org/plugins/list-backorders-for-woocommerce/" rel="nofollow noreferrer">a plugin</a> that create a separate menu link lisitng backorders only.</p>
  
  <p>Is there a filter I could add in functions.php that would do the job ? I don't want to install a plugin just for that.</p>
  
  <p>Right Now i've only been able to add a custom backorder status using this code below, the second step would be to trigger the status when there is a backordered product.</p>
  
  <pre><code>/** 
   * Register new status
   * Tutorial: http://www.sellwithwp.com/woocommerce-custom-order-status-2/
  **/
  function register_backorders_order_status() {
      register_post_status( 'wc-backorders', array(
          'label'                     =&gt; 'Backorders',
          'public'                    =&gt; true,
          'exclude_from_search'       =&gt; false,
          'show_in_admin_all_list'    =&gt; true,
          'show_in_admin_status_list' =&gt; true,
          'label_count'               =&gt; _n_noop( 'backorders &lt;span class="count"&gt;(%s)&lt;/span&gt;', 'Awaiting shipment &lt;span class="count"&gt;(%s)&lt;/span&gt;' )
      ) );
  }
  add_action( 'init', 'register_backorders_order_status' );
  // Add to list of WC Order statuses
  function add_backorders_to_order_statuses( $order_statuses ) {
      $new_order_statuses = array();
      // add new order status after processing
      foreach ( $order_statuses as $key =&gt; $status ) {
          $new_order_statuses[ $key ] = $status;
          if ( 'wc-processing' === $key ) {
              $new_order_statuses['wc-backorders'] = 'Backorders';
          }
      }
      return $new_order_statuses;
  }
  add_filter( 'wc_order_statuses', 'add_backorders_to_order_statuses' );
  </code></pre>