I would like to show only the list of product ids in the tax query using woocommerce_product_query
filter.
So I need to add an additional filter along with a tax query to filter to show only products with given ids.
$tax_query[] = array('add filter to show only specified products');
$q->set( 'tax_query', $tax_query );
Thanks
I would like to show only the list of product ids in the tax query using woocommerce_product_query
filter.
So I need to add an additional filter along with a tax query to filter to show only products with given ids.
$tax_query[] = array('add filter to show only specified products');
$q->set( 'tax_query', $tax_query );
Thanks
Share Improve this question edited Nov 25, 2020 at 10:08 Ivan Shatsky 8901 gold badge7 silver badges12 bronze badges asked Nov 25, 2020 at 7:54 prajoshprajosh 11 bronze badge1 Answer
Reset to default 0Maybe I somehow misunderstood your question, but you don't need the tax_query
for that, just use the
$ids = array( <ID1>, <ID2>, ... );
$q->set( 'post__in', $ids );