[wp-trac] [WordPress Trac] #45719: Setting an empty post_status in wp_edit_posts_query() breaks WooCommerce list tables

WordPress Trac noreply at wordpress.org
Thu Dec 20 05:58:01 UTC 2018


#45719: Setting an empty post_status in wp_edit_posts_query() breaks WooCommerce
list tables
-------------------------------+---------------------
 Reporter:  pento              |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  5.0.3
Component:  Posts, Post Types  |     Version:  5.0.2
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+---------------------

Comment (by pento):

 Here's a workaround:


 {{{#!php
 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 );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45719#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list