woocommerce_gallery_thumbnail_size filter-hookWC 3.3.2

Get HTML for a gallery image.

Hooks: woocommerce_gallery_thumbnail_size, woocommerce_gallery_image_size and woocommerce_gallery_full_size accept name based image sizes, or an array of width/height values.

Usage

add_filter( 'woocommerce_gallery_thumbnail_size', 'wp_kama_woocommerce_gallery_thumbnail_size_filter' );

/**
 * Function for `woocommerce_gallery_thumbnail_size` filter-hook.
 * 
 * @param int $attachment_id Attachment ID.
 *
 * @return int
 */
function wp_kama_woocommerce_gallery_thumbnail_size_filter( $attachment_id ){

	// filter...
	return $attachment_id;
}
$attachment_id(int)
Attachment ID.

Changelog

Since 3.3.2 Introduced.

Where the hook is called

wc_get_gallery_image_html()
woocommerce_gallery_thumbnail_size
wc_get_product_attachment_props()
woocommerce_gallery_thumbnail_size
woocommerce/includes/wc-template-functions.php 1576
$thumbnail_size    = apply_filters( 'woocommerce_gallery_thumbnail_size', array( $gallery_thumbnail['width'], $gallery_thumbnail['height'] ) );
woocommerce/includes/wc-product-functions.php 802
$gallery_thumbnail_size           = apply_filters( 'woocommerce_gallery_thumbnail_size', array( $gallery_thumbnail['width'], $gallery_thumbnail['height'] ) );

Where the hook is used in WooCommerce

Usage not found.