add out of stock criteria to tax_query array instead of replacing it

This commit is contained in:
Ron Rennick 2018-12-14 14:52:26 -04:00
parent 32ae40ffb0
commit 771a615328
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ class WC_Widget_Products extends WC_Widget {
}
if ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) ) {
$query_args['tax_query'] = array(
$query_args['tax_query'][] = array(
array(
'taxonomy' => 'product_visibility',
'field' => 'term_taxonomy_id',