Product counts are wrong on first load or after site cache is cleared.
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 pleaseIf 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.
Quote from fredw on November 30, 2023, 19:28I have installed the Products Filter plugin on a wp site running at wpengine.com. When displaying products via a product tag, the initial load shows counts for all products not just those that have the product tag. If I refresh the page, the counts are correct. The counts remain correct until the cache resets (or I clear it using the wpengine.com portal). If I go to the Products Filter settings and click the "Save changes" button, the counts will be wrong again for the next load. Then correct on a subsequent load.
I have Dynamic recount set to "yes". I have all the cache settings disabled in the Products Filter settings and I have added a cache exclusion for the product tag url (^/products./*). However, the behavior is still there. Unfortunately, wpengine.com does not allow for disabling the cache for the entire site to prove the cache is causing the issue. Below are screenshots for clarity
First Load:
Second load:
I have installed the Products Filter plugin on a wp site running at wpengine.com. When displaying products via a product tag, the initial load shows counts for all products not just those that have the product tag. If I refresh the page, the counts are correct. The counts remain correct until the cache resets (or I clear it using the wpengine.com portal). If I go to the Products Filter settings and click the"Save changes" button, the counts will be wrong again for the next load. Then correct on a subsequent load.
I have Dynamic recount set to"yes". I have all the cache settings disabled in the Products Filter settings and I have added a cache exclusion for the product tag url (^/products./*). However, the behavior is still there. Unfortunately, wpengine.com does not allow for disabling the cache for the entire site to prove the cache is causing the issue. Below are screenshots for clarity
First Load:

Second load:

Quote from fredw on November 30, 2023, 19:50I just realized that if I navigate away from the page (ie. click on a product to show the product detail page) and then return, the counts are wrong again.
I just realized that if I navigate away from the page (ie. click on a product to show the product detail page) and then return, the counts are wrong again.
Quote from Pablo Borysenco on December 1, 2023, 11:45Hello
What plugin version number are you using?
you can try in file - \wp-content\plugins\woocommerce-products-filter\index.php - add this code - https://share.pluginus.net/image/i20231201114513.png
if (wc_current_theme_is_fse_theme()) {if (!defined('DOING_AJAX') && !is_page()) {global $wp_query;$queried_obj = get_queried_object();if (isset($wp_query->query_vars['taxonomy']) and is_object($queried_obj) and get_class(get_queried_object()) == 'WP_Term' and !isset($request_data['really_curr_tax'])) {if (is_object($queried_obj)) {$this->set_really_current_term($queried_obj);}} elseif (isset($request_data['really_curr_tax'])) {$tmp = explode('-', $request_data['really_curr_tax'], 2);$res = get_term($tmp[0], $tmp[1]);$this->set_really_current_term($res);} else {$this->set_really_current_term();}}}and do a test
Hello
What plugin version number are you using?
you can try in file - \wp-content\plugins\woocommerce-products-filter\index.php - add this code - https://share.pluginus.net/image/i20231201114513.png
Quote from fredw on December 1, 2023, 18:19Thanks for the reply!
made the change (screenshot below), but still seeing the same behavior.
FYI...we are using Breakdance (breakdance.com) with the wordpress theme disabled (default settings for breakdance).
Site:
https://weirswoocom.wpenginepowered.com/products./all-country-store/
Thanks for the reply!
made the change (screenshot below), but still seeing the same behavior.
FYI...we are using Breakdance (breakdance.com) with the wordpress theme disabled (default settings for breakdance).
Site:
https://weirswoocom.wpenginepowered.com/products./all-country-store/

Quote from fredw on December 1, 2023, 18:36I droped the "if (wc_current_theme_is_fse_theme())" statement and it's working now (screenshot below).
Thank you so much! Will I need to "reapply" this fix after every update?
I droped the"if (wc_current_theme_is_fse_theme())" statement and it's working now (screenshot below).
Thank you so much! Will I need to"reapply" this fix after every update?

Quote from Pablo Borysenco on December 4, 2023, 12:30Hello
Ok! Can you try to use this function wp_is_block_theme() instead of wc_current_theme_is_fse_theme() ? just for the test
Hello
Ok! Can you try to use this function wp_is_block_theme() instead of wc_current_theme_is_fse_theme() ? just for the test
Quote from fredw on December 4, 2023, 17:36wrapping the code with "if (wp_is_block_theme())" did not work. I'm guessing this is due to us using breakdance with WP theme disabled.
wrapping the code with"if (wp_is_block_theme())" did not work. I'm guessing this is due to us using breakdance with WP theme disabled.

Quote from Pablo Borysenco on December 5, 2023, 13:01Hello
Unfortunately in this case you have to make these changes every time you update the filter
Hello
Unfortunately in this case you have to make these changes every time you update the filter