Reply To: Plugin Customasation


Ernest Marcinko


Yes, I did investigate this further, but the issue is not within the search apparently, nor within the core W3TC plugin.

I see you have a custom made W3TC plugin as well, which I guess takes the localized inline script and puts it within a custom function. That is not correct, as it moves it out of the window scope and the ASP variable gets undefined.

If you are the one who made that, then make sure that the:

wp_localize_script('wd-asp-ajaxsearchpro', 'ASP', array(…

and the

wp_localize_script('wd-asp-ajaxsearchpro', 'ajaxsearchpro', array(..

..localizations are not moved away from the window scope. This is not possible to fix from this plugins perspective, as wp_localize_script is a core wordpress function, which places an inline script just before the handler, which is executed in the window scope. If the output is moved to a custom javascript function, it will not work.

Ernest Marcinko

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