Last active
December 20, 2018 09:40
-
-
Save conschneider/70ed39c3fe1a379d92300cc143743354 to your computer and use it in GitHub Desktop.
WooCommerce WordPress 5.0.2 orders tab fix - fixes the empty all orders tab in WooCommerce after updating to WordPress 5.0.2
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
if(version_compare(get_option( 'woocommerce_version' ),"3.5.2","<=") && version_compare(get_bloginfo( 'version' ),"5.0.2","=") ){ | |
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