title: Woocommerce - Delete customers who haven't ordered in the last year
body: <p>I am trying to clean up my woocommerce shop.  We have 13,000 customers.  I would like to delete all customers who have not ordered within the last year.</p>
  <p>I'm running into several problems though.  (mostly, ignorance!)</p>
  <p>In the Woocommerce/customers section I can filter by last active but there is no way to delete users from this area.</p>
  <p>I tried using this code:</p>
  <pre><code>add_filter( 'manage_users_columns', 'prefix5487_modify_user_columns' );
  
  function prefix5487_modify_user_columns( $column ) {
      $column['orders'] = __( 'Order count' );
      return $column;
  }
  add_filter( 'manage_users_custom_column', 'prefix5487_user_order_column_value', 10, 3 );
  
  function prefix5487_user_order_column_value( $val, $column_name, $user_id ) {
      switch ($column_name) {
          case 'orders' :
              return wc_get_customer_order_count( $user_id );
          default:
      }
      return $val;
  }
  
  add_filter( 'manage_users_sortable_columns', 'prefix5487_make_registered_column_sortable' );
  
  function prefix5487_make_registered_column_sortable( $columns ) {
      return wp_parse_args( array( 'orders' =&gt; 'orders' ), $columns );
  }
  </code></pre>
  <p>which works to add the amount of orders a customer has made in total.  This is the closest I've found so far.  It doesn't sort correctly though.</p>
  <p>The problem is that if I delete users in the Users section, they are still in the woocommerce Customers section of the backend.  I'm also not sure if this is deleting the orders that those customers made (I don't necessarily care if it does or not).  Not to mention that this function adds the column and shows order count but it doesn't actually SORT so I still have to go through one by one)</p>
  <p>On another site I saw that I would have to delete the users from wp_wc_customer_lookup table as well.</p>
  <p>It seems like there would be an easy way to do this</p>