Support » Plugin: WooCommerce » Woocommerce 2.x Lightbox doesn't work

  • gonzalesc


    I’m programming a payment gateway for Woocommerce and I need show a iframe using lightbox, I read this post but it doesn’t work for me.

    function gowc_pefectivo_lightbox() {
        global $woocommerce;
        $suffix      = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
        $lightbox_en = get_option( 'woocommerce_enable_lightbox' ) == 'yes' ? true : false;
        if ( $lightbox_en ) {
            wp_enqueue_script( 'prettyPhoto', $woocommerce->plugin_url() . '/assets/js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array( 'jquery' ), $woocommerce->version, true );
            wp_enqueue_script( 'prettyPhoto-init', $woocommerce->plugin_url() . '/assets/js/prettyPhoto/jquery.prettyPhoto.init' . $suffix . '.js', array( 'jquery' ), $woocommerce->version, true );
            wp_enqueue_style( 'woocommerce_prettyPhoto_css', $woocommerce->plugin_url() . '/assets/css/prettyPhoto.css' );
    add_action( 'wp_enqueue_scripts', 'gowc_pefectivo_lightbox' );

    The libraries (of above) are shown correctly when I see the HTML source but when I click in the image, this open in other tab, doesn’t use lightbox.

    I have a test website, the only plugin installed is Woocommerce 2.x, I have used rel=”prettyPhoto[iframes]” and too rel=”prettyPhoto” (with a image), but neither work.

    Note1: My option lightbox in the admin panel is enabled.
    Note2: The payment gateway is PagoEfectivo.

Viewing 1 replies (of 1 total)
  • gonzalesc


    I realized that the lightbox effect works in all other pages, but it doesn’t work in checkout page that it is I need

Viewing 1 replies (of 1 total)
  • The topic ‘Woocommerce 2.x Lightbox doesn't work’ is closed to new replies.