Home Forums Themes Support How to return Default WooCommerce Gallery in HaruTheme

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #13254

    Hi all customer,

    Thanks so much choosing our product! In this topic tutorial we’ll help you disable WooCommerce gallery in our theme, so you can use default WooCommerce gallery when you using some Extra plugin.

    To manage file you can use FTP or File Manager of your hosting provider or install this plugin: https://wordpress.org/plugins/file-manager-advanced/

    Step 1: First of all please make sure you updated theme & plugins to the latest version by following this topic:

    How to update WordPress theme Automatic from ThemeForest

    Step 2: Go to wp-content/themes/teespace/ then open file functions.php and add this code:

    if ( ! function_exists( 'haru_dont_load_cart_template_theme_override' ) ) {
    	function haru_dont_load_cart_template_theme_override( $template, $template_name, $args, $template_path, $default_path ) {
    		$exclude_templates = array(
    			'single-product/product-image.php',
    			'single-product/add-to-cart/variable.php',
    			// 'single-product.php', // Elementor Pro single product builder
    			// 'content-single-product.php', // Elementor Pro single product 
    		);
    
    	   	if ( in_array( $template_name, $exclude_templates )  ) {
    	      	$default_path = WC()->plugin_path() . '/templates/';
    	      	$template = $default_path . $template_name;
    	   	}
    
    	   	return $template;
    	}
    
    	add_filter( 'wc_get_template', 'haru_dont_load_cart_template_theme_override', 9999, 5 );
    }
    
    add_theme_support( 'wc-product-gallery-slider' );

    (You can change teespace to the theme name you are using)

    You can do this via child theme to keep this custom when you update our theme to the latest version.

    Thanks for your reading and hope this helps!

    ****
    Best regards,

    HaruTheme

    • This topic was modified 2 weeks, 4 days ago by admin.
    • This topic was modified 2 weeks, 4 days ago by admin.
    • This topic was modified 2 weeks, 4 days ago by admin.
    • This topic was modified 2 weeks, 4 days ago by admin.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.