Merge pull request #23446 from woocommerce/fix/23439

Product list table shipping class tax_query
This commit is contained in:
Mike Jolley 2019-04-24 14:56:00 +01:00 committed by GitHub
commit 98dfb8e8c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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',
);
}