Last active
November 28, 2023 15:13
-
-
Save digitalchild/f9a3ac6840eb01561c8d9dbdc589c414 to your computer and use it in GitHub Desktop.
Fix for no orders found WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Found https://core.trac.wordpress.org/ticket/45719 | |
function fix_request_query_args_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_request_query_args_for_woocommerce', 1, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment