admin管理员组文章数量:1314273
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 );
本文标签:
版权声明:本文标题:categories - How to show given products only using product id array from specific category page in woocommerce 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741965588a2407527.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论