diff --git a/woocommerce_query.php b/woocommerce_query.php index 47fa6aac25b..4830fc47bc6 100644 --- a/woocommerce_query.php +++ b/woocommerce_query.php @@ -20,7 +20,7 @@ function woocommerce_parse_query( $q ) { if (is_admin()) return; // Only apply to product categories, the product post archive, the shop page, and product tags - if (true == $q->query_vars['suppress_filters'] || (!$q->is_tax( 'product_cat' ) && !$q->is_post_type_archive( 'product' ) && !$q->is_page( get_option('woocommerce_shop_page_id') ) && !$q->is_tax( 'product_tag' ))) return; + if ( ( isset( $q->query_vars['suppress_filters'] ) && true == $q->query_vars['suppress_filters'] ) || (!$q->is_tax( 'product_cat' ) && !$q->is_post_type_archive( 'product' ) && !$q->is_page( get_option('woocommerce_shop_page_id') ) && !$q->is_tax( 'product_tag' ))) return; $meta_query = (array) $q->get( 'meta_query' ); diff --git a/woocommerce_taxonomy.php b/woocommerce_taxonomy.php index a8849f41e9e..2256685b507 100644 --- a/woocommerce_taxonomy.php +++ b/woocommerce_taxonomy.php @@ -79,7 +79,7 @@ function woocommerce_post_type() { $hierarchical = true; if ($name) : - $label = ($tax->attribute_label) ? $tax->attribute_label : $tax->attribute_name; + $label = ( isset( $tax->attribute_label ) && $tax->attribute_label ) ? $tax->attribute_label : $tax->attribute_name; register_taxonomy( $name, array('product'),