PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Assistance Needed with HUSKY – Products Filter

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

I am currently using the HUSKY – Products Filter Professional for WooCommerce plugin on my website, and I have encountered an issue that I need assistance with.

Issue Description: I am trying to configure the filter to display only product variations on the shop page, while hiding the parent products. Despite my attempts to modify the settings and use custom code snippets, I am unable to achieve the desired result.

  1. Current Setup:
    • I have enabled the option to show variations.
    • I have tried adding custom code to exclude parent products.
  2. What I’ve Tried:
    • Implementing the following code snippet, which did not yield the expected results:
      php
      add_action('pre_get_posts', 'show_variations_only_in_shop');
      function show_variations_only_in_shop($query) {
      if (!is_admin() && $query->is_main_query() && (is_shop() || is_product_taxonomy())) {
      $query->set('post_type', array('product_variation'));
      $query->set('post_parent__not_in', array(0));
      }
      }

Questions:

  • Is there a specific setting in HUSKY that I might have overlooked to achieve this?
  • Can you provide guidance on any additional modifications or best practices to hide parent products while displaying only the variations?

I appreciate your assistance and look forward to your response.

Thank you!

Hello
Unfortunately the plugin does not have such a feature
Try using third-party plugins which can display variable products as simple products
But unfortunately we have no guarantees that the filter will work correctly with such a customization.
The problem is that the variant product doesn't have a title and category and means the filter won't exactly be able to do a search on those fields