Answers for "remove zoom woocommerce"

PHP
0

woocommerce disable zoom on product image

/* Disable zoom on Woocommerce Product Images */

// Append to your child theme's functions.php
function remove_image_zoom_support() {
    remove_theme_support( 'wc-product-gallery-zoom' );
}
add_action( 'wp', 'remove_image_zoom_support', 100 );
Posted by: Guest on February-04-2021
0

woocommerce disable zoom on product image

add_filter( 'woocommerce_single_product_zoom_enabled', '__return_false' );
Posted by: Guest on October-19-2021
0

woocommerce disable product zoom

add_action( 'wp', 'custom_remove_product_zoom' );

function custom_remove_product_zoom() {
  remove_theme_support( 'wc-product-gallery-zoom' );
}
Posted by: Guest on April-06-2022
0

remove product zoom on woo commerce

/**
 * Remove Zoom Effect on WooCommerce Product Image ( put in functions.php file of theme)
 *
 * @param $html, $post_id 
 *
 * @return $function 
 */

function njengah_remove_zoom_effect_product_image( $html, $post_id ) {
	
    $post_thumbnail_id = get_post_thumbnail_id( $post_id );
    return get_the_post_thumbnail( $post_thumbnail_id, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ) );
}
add_filter('woocommerce_single_product_image_thumbnail_html', 'njengah_remove_zoom_effect_product_image', 10, 2);
Posted by: Guest on December-03-2021

Code answers related to "remove zoom woocommerce"

Browse Popular Code Answers by Language