📅  最后修改于: 2022-03-11 14:57:40.637000             🧑  作者: Mango
/**
* 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);