Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #487378

    Hello,

    I am developing a site with Enfold theme where I’d like to include a plugin to add a wishlist to woocommerce, I was just trying YITH WooCommerce Wishlist when I came across a problem.

    Apparently this plugin loads the prettyPhoto script, and despite your theme now using Magnific Popup for opening product images in a lightbox, in the file config.php inside the ‘config-woocommerce’ folder, I still see prettyPhoto tags being used, and that is causing my product galleries to open both lightboxes, the expected one with Magnific Popup and another prettyPhoto one on top of that.

    I’m going to try preventing that wishlist plugin from loading prettyPhoto, but I guess you guys might like to know about this conflict and maybe do some changes to the theme to prevent these issues.

    Best regards!

    #487799

    Hi emotionalbrands!

    Thanks for the notice. We can give you some code to exclude those images from the magnific script.

    If you want to use the magnific script though then it would be best to disable the prettyPhoto in the wishlist plugin. We left those in there in case the user wanted to disable the magnific script and just use the Woocommerce default.

    Best regards,
    Elliott

    • This reply was modified 8 years, 7 months ago by Elliott.
    #487805

    Hey, thanks for the quick reply.

    Yes I prefer to keep using Magnific Popup as the lightbox for my product images, so I already added some code to my functions.php to dequeue prettyPhoto’s scripts.

    I’m leaving my code for that here as reference in case someone else runs into a similar issue:

    // Dequeue prettyPhoto 
    function prettyphoto_dequeue_script() {
    	wp_dequeue_script('prettyPhoto');
    	wp_dequeue_script('prettyPhoto-init');
    }
    add_action('wp_print_scripts', 'prettyphoto_dequeue_script', 100);
    

    Best regards,
    José Almeida

    #488127

    Hey José,

    Thanks for sharing, much appreciated :-)

    Regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.