Since WordPress 5.0.2, many WooCommerce installations have had an issue where all the shop’s products have seemingly disappeared. Don’t worry, they’re still there, but if your WooCommerce installation is showing “No orders found” in the Orders sections of your Dashboard, here’s what you’ll need to do to fix it.

Simply add this little function at the bottom of your theme or child theme’s functions.php file:

function fix_no_orders_found_bug_for_woocommerce( $query_args ) {
  if ( isset( $query_args['post_status'] ) && empty( $query_args['post_status'] ) ) {
    unset( $query_args['post_status'] );
  }
  return $query_args;
}
add_filter( 'request', 'fix_no_orders_found_bug_for_woocommerce', 1, 1 ); 

And that’s all you’ll need. Your orders will no longer be missing in action.