Title: Can&#8217;t find variable: wp &#8211; JavaScript error
Last modified: January 31, 2020

---

# Can’t find variable: wp – JavaScript error

 *  Resolved [James Hunt](https://wordpress.org/support/users/bonkerz/)
 * (@bonkerz)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/cant-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)

 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cant-find-variable-wp-javascript-error/#post-12571411)
 * Hi [@bonkerz](https://wordpress.org/support/users/bonkerz/)
 * Sorry for the late response.
 * Could you please check if the issue still occurs with the latest version?
 * Feel free to re-open this thread if there’s any question that may come up.
 * Regards,
 *  Thread Starter [James Hunt](https://wordpress.org/support/users/bonkerz/)
 * (@bonkerz)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cant-find-variable-wp-javascript-error/#post-12571480)
 * Yes the issue seems to have gone away now

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Can’t find variable: wp – JavaScript error’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

## Tags

 * [can't find](https://wordpress.org/support/topic-tag/cant-find/)
 * [um](https://wordpress.org/support/topic-tag/um/)
 * [variable](https://wordpress.org/support/topic-tag/variable/)

 * 2 replies
 * 2 participants
 * Last reply from: [James Hunt](https://wordpress.org/support/users/bonkerz/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/cant-find-variable-wp-javascript-error/#post-12571480)
 * Status: resolved