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

Generate filters by author

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.

Hi Pablo,

I managed to filter products by author using the 'woof_products_query' hook. However, I failed to do so with filters. The filters are being displayed with no restriction to the author products and since it's not a taxonomy, I cannot add 'taxonomies=..' in the shortcode. It is resulting with categories such as 'CategoryX(23)' and then no products are found..

I tried with the hook overload, as well as, the following shortcode with the extension by_author installed:

[woof by_only=by_author:139]
Is there a way I can apply the author condition on the filters as well, please? Perhaps via the 'woof_filter_shortcode_args' hook?

Thanks and regards,

Gary Zammit

Hello Gary

There are two solutions:

1 https://products-filter.com/manipulate-search-data-options - in this case your customization  'woof_products_query'   is not needed

2 Use  this  hook - woof_dynamic_count_attr - https://share.pluginus.net/image/i20220914080851.png - you can just change the request like in your customization 'woof_products_query'

Hi Pablo,

Solution 2 worked perfectly well, thanks!

The reason I did not go for solution 1 is because I noticed that the method is hit 100s of times per page refresh so it might impact performance.

Thanks and regards.

Hello

Ok!  Great!

Welcome;)