How to define variables in WordPress AJAX?
If you mean when you access you variables in JS code just by name they are really undefined in JavaScript environment. In order to access variables in JS you need to type as in your example www_vars.whichcats instead of just whichcats Also it’s good to understand how wp_localize_script works. First param is your js file … Read more