WooCommerce No Orders Found Problem

/WooCommerce No Orders Found Problem

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.

2018-12-20T15:51:44+00:00December 20th, 2018|Programming Tips, WordPress Snippets|0 Comments

About the Author:

Warren Chandler is a freelance web programmer and web developer, based in Frinton on Sea, Essex. Warren specialises in web programming, web design, corporate identity, copy writing, SEO, logo and print media for home, work, and mobile platforms.

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.