• Resolved irumsohale

    (@irumsohale)


    I need to change slider location with hook/ function. have you updated it?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Niloy

    (@im_niloy)

    If you want to use it in a different location, you can use this shortcode

    [product_gallery_slider]
    Thread Starter irumsohale

    (@irumsohale)

    Thank you. but how to remove the original one?

    Plugin Author Niloy

    (@im_niloy)

    It’s not possible right now without editing the core file (Not recommended)
    But in the next release will add a filter to disable the original plugin gallery.

    add_filter( 'wpgs_default_gallery_hook', '__return_false' );

    Here is the updated version link below that we will release soon https://www.dropbox.com/t/vl4aY2zU58sGlWJ4
    if you want to use the above filter now, then download it and add the filter in your child theme functions.php

    Thread Starter irumsohale

    (@irumsohale)

    thank you for the effort but It’s not working.


    Plugin Author Niloy

    (@im_niloy)

    Not sure why it’s not working on your side. Please try this version https://www.dropbox.com/t/yGO5QiIv2KIoHzNs
    I tweak it again.
    If this does not work, kindly wait for the official release.

    Thread Starter irumsohale

    (@irumsohale)

    Thank you so much. It worked. You will surely update with better code after the release.

    add_filter( 'wpgs_default_gallery_hook', '__return_false' );
    
    function show_slider(){ 
        if ( !apply_filters( 'wpgs_default_gallery_hook', true ) ) {
    	
    	add_filter( 'wpgs_default_gallery_hook', '__return_true' );
    	echo do_shortcode('[product_gallery_slider]');
    }
    else {
        add_action( 'woocommerce_product_tabs', 'wpgs_default_gallery_hook', 30 );
    }
    
    }
    add_action( 'woocommerce_product_tabs', 'show_slider', 30 );
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Constant / Global Function wpgs_product_image()’ is closed to new replies.