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

Filters plugin stopped working

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,

The plugin on that site: https://test.electron.bg stopped working.

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

https://test.electron.bg/product-category/drebna-bqla-tehnika/mikseri/?orderby=price

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.

Hello

Please  drop me  wp-admin access( https://c2n.me/42BAoj4.png )  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?

 

Hello

Please renew  your  support.

Update  plugin to  latest version - https://products-filter.com/how-to-make-auto-update-for-wordpress-plugins-and-themes-bought-on-envato/

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.

 

Hello

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

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

 

Hello,

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.

Hello

Please  do test!

Hello,

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).

https://test.electron.bg/product-category/telefoni/mobilni-telefoni/?orderby=price

Hello

Can I disable plugins/theme to test?

Hello,

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(
array(
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'exclude-from-catalog',
'operator' => '!=',
)
);
$q->set( 'tax_query', $tax_query);
}

Hello

Please delete  your  code.

Check  options - https://c2n.me/44SdP3c.png  AND https://c2n.me/44SdRYa.png

Hello,

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?

 

 

Hello

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?

Hello,
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.

Hello

Ok! In file - wp-content\plugins\woocommerce-products-filter\index.php  - the plugin adds this code -  https://c2n.me/44V4SOB.png