Title: Javscript code loading twice
Last modified: May 25, 2017

---

# Javscript code loading twice

 *  Resolved [cowboysaif](https://wordpress.org/support/users/cowboysaif/)
 * (@cowboysaif)
 * [9 years ago](https://wordpress.org/support/topic/javscript-code-loading-twice/)
 * Hi,
    Zopim Live Chat Script is loading twice in the wordpress page. Also there
   is a syntax error in the code. The full code can be viewed here: [http://prntscr.com/fc5js9](http://prntscr.com/fc5js9)
   Plugin version: 1.4.10

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

 *  Thread Starter [cowboysaif](https://wordpress.org/support/users/cowboysaif/)
 * (@cowboysaif)
 * [9 years ago](https://wordpress.org/support/topic/javscript-code-loading-twice/#post-9170582)
 * If anyone wondering how to solve this, please remove line 35
    `echo Zopim_Options::
   get_widget_options();` from includes/class-widget.php
 *  [3lm4r10](https://wordpress.org/support/users/3lm4r10/)
 * (@3lm4r10)
 * [9 years ago](https://wordpress.org/support/topic/javscript-code-loading-twice/#post-9177999)
 * Que variables se utilizan para ingresar el nombre y el correo si inicia sesion
   un usuario?
 * <script>$zopim(function(){$zopim.livechat.set({name: ??? , email: ??? }); });
   $zopim( function() {
    })</script>
 *  [3lm4r10](https://wordpress.org/support/users/3lm4r10/)
 * (@3lm4r10)
 * [9 years ago](https://wordpress.org/support/topic/javscript-code-loading-twice/#post-9178004)
 * What variables are used to enter the name and mail if a user logs in?
 * <script>$zopim(function(){$zopim.livechat.set({name: , email: }); });$zopim( 
   function() {
    })</script>
 *  Plugin Author [zendesk_official](https://wordpress.org/support/users/zendesk_official/)
 * (@zendesk_official)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/javscript-code-loading-twice/#post-9345114)
 * Hi [@cowboysaif](https://wordpress.org/support/users/cowboysaif/),
 * Thanks for reporting this. you will get that error if you manually paste the 
   widget Zendesk Chat Script into the widget options field. The chat script is 
   added automatically by the plugin. The widget options textarea is for additional
   customisations that you may need with the plugin. Please refer to this link for
   what you can do with the widget options:
    [https://api.zopim.com/files/meshim/widget/controllers/LiveChatAPI-js.html](https://api.zopim.com/files/meshim/widget/controllers/LiveChatAPI-js.html)
 * If you do not need widget options, you may leave it as
 * $zopim(function() {});
 * Thanks.
    -  This reply was modified 8 years, 10 months ago by [zendesk_official](https://wordpress.org/support/users/zendesk_official/).
      Reason: Improved context

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

The topic ‘Javscript code loading twice’ is closed to new replies.

 * ![](https://ps.w.org/zopim-live-chat/assets/icon.svg?rev=1522846)
 * [Zendesk Chat](https://wordpress.org/plugins/zopim-live-chat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/zopim-live-chat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/zopim-live-chat/)
 * [Active Topics](https://wordpress.org/support/plugin/zopim-live-chat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/zopim-live-chat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/zopim-live-chat/reviews/)

## Tags

 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * 4 replies
 * 3 participants
 * Last reply from: [zendesk_official](https://wordpress.org/support/users/zendesk_official/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/javscript-code-loading-twice/#post-9345114)
 * Status: resolved