Incompatibility with Woocommerce - duplicate enqueing of fancybox (1 post)

  1. James Barlow
    Posted 3 years ago #

    Had a slight problem using instapress alongside woocommerce, as both try to enqueue a script file with handle "fancybox". I was in a hurry, so I just changed instapress.php to use a different handle:

    // Fancybox
    wp_register_script('fancybox-instapress', plugins_url('/fancybox/jquery.fancybox-1.3.4.pack.js', __FILE__), array('jquery'), "1.3.4");
    // Default JS
    wp_enqueue_script('instapress', plugins_url('/instapress.js', __FILE__), array('jquery', 'fancybox-instapress'), InstagramPlugin::getVersion(), true);

    Possibly the correct solution would be for one (or both) plugins to do a check to see if the library is already registered. [Codex function reference below]

  2. http://codex.wordpress.org/Function_Reference/wp_script_is
  3. http://wordpress.org/extend/plugins/instapress/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic