diff --git a/includes/wc-term-functions.php b/includes/wc-term-functions.php index 285c874c7cd..89571d73c35 100644 --- a/includes/wc-term-functions.php +++ b/includes/wc-term-functions.php @@ -138,7 +138,7 @@ function wc_product_dropdown_categories( $args = array(), $deprecated_hierarchic $args['orderby'] = $deprecated_orderby; } - $current_product_cat = isset( $wp_query->query['product_cat'] ) ? $wp_query->query['product_cat'] : ''; + $current_product_cat = isset( $wp_query->query_vars['product_cat'] ) ? $wp_query->query_vars['product_cat'] : ''; $defaults = array( 'pad_counts' => 1, 'show_count' => 1,