Can’t find variable: wp – JavaScript error
-
Using latest Ultimate Member, I am getting JavaScript error:
Can't find variable: wp
This relates to this block of code inserted by UM, particularly the bolded line:
<script type='text/javascript'> ( function( domain, translations ) { var localeData = translations.locale_data[ domain ] || translations.locale_data.messages; localeData[""].domain = domain; <strong>wp.i18n.setLocaleData( localeData, domain );</strong> } )( "default", { "locale_data": { "messages": { "": {} } } } ); </script>
I think this relates to a widely-used performance function we use to defer all JavaScript.
1) I can specify files to not be deferred (i.e. jquery.js), but I don’t know what file the i18n snippet is relating to, can you let me know?
2) Our site doesn’t need i18n, so how can I just remove this snippet from being added?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Can’t find variable: wp – JavaScript error’ is closed to new replies.