woocommerce_product_attributes_filterer_hide_out_of_stock
woocommerce_product_attributes_filterer_hide_out_of_stock
Appears in: woocommerce.9.8.1
Hook Type: filter
Displaying hooks found in version: woocommerce.9.8.1apply_filters('woocommerce_product_attributes_filterer_hide_out_of_stock') is found 2 times:
- /src/Internal/ProductAttributesLookup/Filterer.php line 78
* @return bool The behavior to use in the catalog when product filtering by attribute. * * @since 9.8.0. */ $hide_out_of_stock = apply_filters( 'woocommerce_product_attributes_filterer_hide_out_of_stock', 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) ); if ( $hide_out_of_stock ) { $in_stock_clause = ' AND in_stock = 1'; } else { $in_stock_clause = ''; }
- /src/Internal/ProductAttributesLookup/Filterer.php line 225
* @return bool The behavior to use in the catalog when product filtering by attribute. * * @since 9.5.0. */ $hide_out_of_stock = apply_filters( 'woocommerce_product_attributes_filterer_hide_out_of_stock', 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) ); $in_stock_clause = $hide_out_of_stock ? ' AND in_stock = 1' : ''; $query = array(); $query['select'] = 'SELECT COUNT(DISTINCT product_or_parent_id) as term_count, term_id as term_count_id'; $query['from'] = "FROM {$this->lookup_table_name}"; $query['join'] = "