woocommerce_gallery_image_size │ filter-hook │ WC 2.6.0

Filters the size for the gallery image.

Usage

add_filter( 'woocommerce_gallery_image_size', 'wp_kama_woocommerce_gallery_image_size_filter' );

/**
 * Function for `woocommerce_gallery_image_size` filter-hook.
 * 
 * @param string $size Image size name.
 *
 * @return string
 */
function wp_kama_woocommerce_gallery_image_size_filter( $size ){
	// filter...
	return $size;
}
$size(string)
Image size name.

Changelog

Since 2.6.0 Introduced.

Where the hook is called

wc_get_product_attachment_props()
woocommerce_gallery_image_size
wc_get_gallery_image_html()
woocommerce_gallery_image_size
ProductMediaGallery::get_gallery_video_html()
woocommerce_gallery_image_size
woocommerce/includes/wc-product-functions.php 1345
$image_size      = apply_filters( 'woocommerce_gallery_image_size', 'woocommerce_single' );
woocommerce/includes/wc-template-functions.php 1845
$image_size        = apply_filters( 'woocommerce_gallery_image_size', $flexslider || $main_image ? 'woocommerce_single' : $thumbnail_size );
woocommerce/src/Internal/ProductGallery/ProductMediaGallery.php 389-392
$image_size = apply_filters(
	'woocommerce_gallery_image_size',
	$flexslider || $main_video ? 'woocommerce_single' : $thumbnail_size
);

Where the hook is used in WooCommerce

Usage not found.