Support Forum

Content of the article

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

Filters plugin stopped working

This support system is for all types of the plugins as for premium versions, so for free ones! If you have premium version do not forget in the private data of the request (!!not in the text of the support request!!) after its publishing insert purchase code please (see green button on the right side) and press Save button.
If you not got email within 24 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 [] 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.


The plugin on that site: stopped working.

It is active only for product categories, here is sample link to see the Javascirpt error:

It loads quite slow because of the huge number of filters (140 defined so far). Please take a look and let me know how to fix that problem.


Please  drop me  wp-admin access( )  I will check  it

I've created an user for you. Please check it.


Did you manage to login and check? Anything you need from me?



Please renew  your  support.

Update  plugin to  latest version -

Do  test.

If  no  luck - disable  js optimization. You have the whole JS connected in footer

Should be renewed now.


Tried all these (latest version is installed as copy/paste) - don't want to link it for automatic upgrades.

Tried enable/disable JS optimization and each option one by one. I didn't make any changes in last couple of weeks and previous week it just stopped working with that JS error: ReferenceError: woof_init_meta_mselects is not defined


The error appears all over again.


That is the only blocker for production migration which I have so far.



Ok! Please  drop me  FTP access I will try  to fix it.

Are you sure the current theme has this hook"wp_footer"?



Yes I believe it has it active.

I don't control the server - will ask for user, I guess the plugin folder?

I've just sent you the FTP account.


Please  do test!


It seems OK now, but the problem now is that the count of products doesn't take into consideration the visibility options.

Please go here and select one category (The first one is producer LG which shows 7 products, when filter - it doesn't show anything).


Can I disable plugins/theme to test?


It's under test now. I'm pasting my code I've added to a custom plug-in in order to remove products, which are hidden or out of stock:

add_action( 'pre_get_posts', 'electron_hide_out_of_stock_products' );
function electron_hide_out_of_stock_products( $q ) {
if ( is_admin() ) return$q;
if ( $_SERVER['REQUEST_URI'] == '/' ) return$q;
$cat_look = strpos($_SERVER['REQUEST_URI'], 'product-category');
if ( $cat_look > 0 ) {
$meta_query = (array) $q->get('meta_query');
$meta_query[] = array(
'key' => '_stock_status',
'value' => 'outofstock',
'compare' => '!='
$q->set( 'meta_query', $meta_query );
$tax_query = (array) $q->get('tax_query');
$tax_query[] = array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'exclude-from-catalog',
'operator' => '!=',
$q->set( 'tax_query', $tax_query);


Please delete  your  code.

Check  options -  AND


You have access to the environment and you would be able to check, that these are set as you described on the screenshots.

I believe that any plugin for filtering should plug-in a bit after 'pre_get_posts'

Any useful information / suggestion?




I believe that any plugin for filtering should plug-in a bit after 'pre_get_posts' - It does not depend on the plugin. This hook works for all database queries(WP_Query). And it can cause a conflict. This hook must be used carefully.

I gave you a solution that works without code.

Have you done the test?

That's where from I started. The theme does't take into consideration the setting, so I have to manually remove those products.
Also - the plugin (woof) doesn't consider the visibility setting of the product - it might be again from the theme, but that's what the customer already has and I can't do much about it, other then sorting out the issues one by one.

The only remaining blocker for production is the count of products in the filtering.


Ok! In file - wp-content\plugins\woocommerce-products-filter\index.php  - the plugin adds this code -