Merge pull request #23446 from woocommerce/fix/23439
Product list table shipping class tax_query
This commit is contained in:
commit
98dfb8e8c2
|
@ -338,7 +338,7 @@ class WC_Admin_List_Table_Products extends WC_Admin_List_Table {
|
|||
?>
|
||||
<select class="wc-category-search" name="product_cat" data-placeholder="<?php esc_attr_e( 'Filter by category', 'woocommerce' ); ?>" data-allow_clear="true">
|
||||
<?php if ( $current_category_slug && $current_category ) : ?>
|
||||
<option value="<?php echo esc_attr( $current_category_slug ); ?>" selected="selected"><?php echo htmlspecialchars( wp_kses_post( $current_category->name ) ); ?><option>
|
||||
<option value="<?php echo esc_attr( $current_category_slug ); ?>" selected="selected"><?php echo esc_html( htmlspecialchars( wp_kses_post( $current_category->name ) ) ); ?><option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
<?php
|
||||
|
@ -487,9 +487,9 @@ class WC_Admin_List_Table_Products extends WC_Admin_List_Table {
|
|||
if ( ! empty( $_GET['product_shipping_class'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
|
||||
$query_vars['tax_query'][] = array(
|
||||
'taxonomy' => 'product_shipping_class',
|
||||
'field' => 'id',
|
||||
'terms' => get_terms( 'product_shipping_class', array( 'fields' => 'ids' ) ),
|
||||
'operator' => 'NOT IN',
|
||||
'field' => 'slug',
|
||||
'terms' => sanitize_title( wp_unslash( $_GET['product_shipping_class'] ) ),
|
||||
'operator' => 'IN',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue