Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Display only grouped products in related products
- This topic has 1 reply, 2 voices, and was last updated 4 years, 2 months ago by WCFM Forum.
Viewing 1 reply thread
- AuthorPosts
- January 24, 2020 at 10:42 pm #103689paattalParticipant
Hello,
I use this woocommerce snippet to display only grouped products in all woocommerce page :
add_filter( 'woocommerce_product_query_tax_query', 'only_grouped_products', 20, 1 ); function only_grouped_products( $tax_query ){ $tax_query[] = array( 'taxonomy' => 'product_type', 'field' => 'name', 'terms' => array('grouped'), ); return $tax_query; }
That’s works fine on store page and I thought have the same feature in single product but not, all store products are still displayed in related products.
Can you help me.
Thank you
- February 6, 2020 at 2:06 pm #105737WCFM ForumKeymaster
Hi,
all store products are still displayed in related products.
– You have to use separate query filter for related products.
Thank you
- AuthorPosts
Viewing 1 reply thread
- You must be logged in to reply to this topic.