[wp-trac] [WordPress Trac] #55144: Taxonomies with `show_in_quick_edit => false` are displayed in the `get_inline_data` template function

WordPress Trac noreply at wordpress.org
Fri Feb 11 14:30:29 UTC 2022


#55144: Taxonomies with `show_in_quick_edit => false` are displayed in the
`get_inline_data` template function
----------------------------+-----------------------------
 Reporter:  ovidiul         |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 **Background
 **

 We have setup a WooCommerce store with a large number of categories
 registered under the `product_cat` taxonomy. Right now, we have about 240
 categories which in return seem to generate a handful of MySQL queries
 making the products page slow on an uncached load.

 Even though we've set the `show_in_quick_edit => false` for that taxonomy,
 it seems that the attribute is still being displayed in the quick edit
 section from the Product List page in the backend.

 The traceroute from WooCommerce is shown like this

 {{{

 WP_Term_Query->get_terms
 WP_Term_Query->query
 get_terms
 wp_get_object_terms
 get_terms_to_edit
 get_inline_data
 WC_Admin_List_Table_Products->render_name_column
 WC_Admin_List_Table->render_columns
 do_action
 WP_Posts_List_Table->column_default
 WP_List_Table->single_row_columns
 WP_Posts_List_Table->single_row
 WP_Posts_List_Table->_display_rows
 WP_Posts_List_Table->display_rows
 WP_List_Table->display_rows_or_placeholder
 WP_List_Table->display
 }}}


 Upon debugging the `get_inline_data` function, I see that the only checks
 that are being made are related to the `show_ui` attribute, while the
 `show_in_quick_edit` checks are missing, compared to what is found
 [here](https://github.com/WordPress/wordpress-
 develop/blob/d87196b560203345b385bef6bef9666e7147bb46/src/wp-
 admin/includes/class-wp-posts-list-table.php#L1564-L1577) in the
 ''inline_edit'' function.

 **Possible Resolution**

 Unless I am missing something here from the existing functionality, could
 we add that check so that custom taxonomies will only appear in the Quick
 Edit section if the `show_in_quick_edit => true` as well?

 Happy to submit a patch if this is on the right line.

 Thank you

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55144>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list