#55144 closed defect (bug) (duplicate)
Taxonomies with `show_in_quick_edit => false` are displayed in the `get_inline_data` template function
Reported by: | ovidiul | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.0 |
Component: | Taxonomy | Keywords: | |
Focuses: | administration | Cc: |
Description
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
Also, I am adding the
woocommerce_taxonomy_args_product_cat
filter to set the product_catshow_in_quick_edit => false
: