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

Problem with empty terms

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.

Hello, I have an interesting problem. I set the option"hide empty terms" in my filters. It hides filters that have terms in them. For example in this category: https://sportconcept.bg/%D0%BC%D1%8A%D0%B6%D0%B5/%D0%BC%D0%B0%D1%80%D0%B0%D1%82%D0%BE%D0%BD%D0%BA%D0%B8-%D0%BA%D0%B5%D1%86%D0%BE%D0%B2%D0%B5/
If you scroll, you can see that the 3rd filter (with sizes) has terms for"40 (190)". If I start the"hide empty terms" option - 40 disappears as a filter.

Hello

Looks like you are using custom code to get terms.

In fact, you don't have any product with a size 40  - https://share.pluginus.net/image/i20210617184703.png

And when the option is set (hide empty terms) my plugin excludes them from the request - https://share.pluginus.net/image/i20210617184912.png

So  in  file - \public_html\wp-content\plugins\woocommerce-products-filter\classes\helper.php - I added  this  code - https://share.pluginus.net/image/i20210617185034.png - Result  - https://share.pluginus.net/image/i20210617185109.png

Hey,

thank you :) Interesting that the woocommerce admin shows 0 terms, but if you click in the zero it shows the products with"40".  I clean every cache and cleck on recount woocommerce terms but no luck. After your changes, it works fine. One last question. I shouldn't update the plugin now - right?

Hello

 I shouldn't update the plugin now - right? - Unfortunately yes. We cannot add this customization to the new version.