Reply To: Search function doesn't work well and hangs up on site

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search function doesn't work well and hangs up on site Reply To: Search function doesn't work well and hangs up on site

#12907

Ernest Marcinko
Keymaster

Hi Paul,

I think I know why actually. The recent plugin release (4.10.3) has an additional hidden filter to ignore products which are not visible on the search page. Turns out, there was a design flaw in WooCommerce (patched since then), and also a mistake I made with the implementation of this filter. Long story short, in some cases it simply is not able to execute, and just hangs up. I believe that is the cause here.

To fix it, you will have to make a tiny change to one of the plugin files. Below I will describe exactly how to do it, but if you want, you can leave FTP access here, and I will do it for you.

– Before you start, please make sure you have a copy of your site files, to be able to restore in case of mistakes.
– Then open up the wp-content\plugins\ajax-search-pro\includes\classes\search\class-asp-query.php
– Scroll to line 384, which should be this:

if ( class_exists( 'WooCommerce' ) ) {

– Change that to this:

if ( class_exists( 'WooCommerce' )  && 0) {

– Save the file, and it's done.

After the change, it should start working immediately.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)