This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Plugin Customasation

#15771
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

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:

[php]wp_localize_script(‘wd-asp-ajaxsearchpro’, ‘ASP’, array(…[/php]

and the

[php]wp_localize_script(‘wd-asp-ajaxsearchpro’, ‘ajaxsearchpro’, array(..[/php]

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