title: Restrict woocommerce order status by role
body: <p>I'm trying to make a workflow where shop managers can create orders and mark them as "pending payment", "processing" but only admins can mark orders as "complete", "failed" etc. </p>
  
  <p>The closest I've found was in <a href="https://stackoverflow.com/questions/21498500/display-post-status-drop-down-by-user-capability">this post:</a></p>
  
  <pre><code>&lt;?php 
  if ( current_user_can(! 'administrator' ) ) {
  $args = array( 'post_type' =&gt; 'post', 'post_status' =&gt; 'publish, pending, 
  draft' );
  } else {
  $args = array( 'post_type' =&gt; 'post', 'post_status' =&gt; 'publish' );
  }
  $wp_query = new WP_Query($args); while ( have_posts() ) : the_post(); ?&gt;
  CONTENT
  &lt;?php endwhile; ?&gt;
  &lt;?php wp_reset_postdata(); ?&gt;
  </code></pre>
  
  <p>This should work for regular WP posts (although I haven't tested it) but I'm not sure how to apply to Woocommerce. My best guess is:</p>
  
  <pre><code>&lt;?php 
  if ( current_user_can(! 'administrator' ) ) {
  $args = array( 'post_type' =&gt; 'shop_order', 'order_status' =&gt; 'complete,failed' );
  } else {
  $args = array( 'post_type' =&gt; 'shop_order', 'post_status' =&gt; 'pending-payment,processing' );
  }
  $wp_query = new WP_Query($args); while ( have_posts() ) : the_post(); ?&gt;
  CONTENT
  &lt;?php endwhile; ?&gt;
  &lt;?php wp_reset_postdata(); ?&gt;
  </code></pre>
  
  <p>But I'm getting all sorts of errors with this! I'm also not sure if it would only apply to the edit order screen and not the admin shop order table bulk actions dropdown.</p>
  
  <p>Any help would be really appreciated!</p>