diff --git a/includes/class-wc-query.php b/includes/class-wc-query.php index 96e7be67490..5c53799ad8d 100644 --- a/includes/class-wc-query.php +++ b/includes/class-wc-query.php @@ -561,22 +561,22 @@ class WC_Query { } } - $product_visibiity_terms = wc_get_product_visibility_term_ids(); - $product_visibility_not_in = array( is_search() && $main_query ? $product_visibiity_terms['exclude-from-search'] : $product_visibiity_terms['exclude-from-catalog'] ); + $product_visibility_terms = wc_get_product_visibility_term_ids(); + $product_visibility_not_in = array( is_search() && $main_query ? $product_visibility_terms['exclude-from-search'] : $product_visibility_terms['exclude-from-catalog'] ); $product_visibility_in = array(); // Hide out of stock products. if ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) ) { - $product_visibility_not_in[] = $product_visibiity_terms['outofstock']; + $product_visibility_not_in[] = $product_visibility_terms['outofstock']; } // Filter by rating. if ( isset( $_GET['rating_filter'] ) ) { $rating_filter = array_filter( array_map( 'absint', explode( ',', $_GET['rating_filter'] ) ) ); - $rating_terms = array(); + $rating_terms = array(); for ( $i = 1; $i <= 5; $i ++ ) { - if ( in_array( $i, $rating_filter ) && isset( $product_visibiity_terms[ 'rated-' . $i ] ) ) { - $rating_terms[] = $product_visibiity_terms[ 'rated-' . $i ]; + if ( in_array( $i, $rating_filter ) && isset( $product_visibility_terms[ 'rated-' . $i ] ) ) { + $rating_terms[] = $product_visibility_terms[ 'rated-' . $i ]; } } if ( ! empty( $rating_terms ) ) { diff --git a/includes/widgets/class-wc-widget-rating-filter.php b/includes/widgets/class-wc-widget-rating-filter.php index 3eed1efd22a..3fd586543e7 100644 --- a/includes/widgets/class-wc-widget-rating-filter.php +++ b/includes/widgets/class-wc-widget-rating-filter.php @@ -110,11 +110,11 @@ class WC_Widget_Rating_Filter extends WC_Widget { } // Set new rating filter. - $product_visibiity_terms = wc_get_product_visibility_term_ids(); + $product_visibility_terms = wc_get_product_visibility_term_ids(); $tax_query[] = array( 'taxonomy' => 'product_visibility', 'field' => 'term_taxonomy_id', - 'terms' => $product_visibiity_terms[ 'rated-' . $rating ], + 'terms' => $product_visibility_terms[ 'rated-' . $rating ], 'operator' => 'IN', 'rating_filter' => true, );