25% off ProSNIPC25OFF

Change Cart and Checkout Thumbnail Size

Overrides the WooCommerce cart and checkout line-item product thumbnail dimensions to a custom width and height.

PHPby SnipCraft
php
<?php
if ( ! class_exists( 'WooCommerce' ) ) {
    return;
}

/**
 * Adjust width and height (pixels) to match your theme's design.
 * crop = 1 hard-crops to exact dimensions; set to 0 for soft-crop.
 */
add_filter( 'woocommerce_get_image_size_shop_thumbnail', 'scseed_cart_thumbnail_size' );
function scseed_cart_thumbnail_size( $size ) {
    return array(
        'width'  => 100,
        'height' => 100,
        'crop'   => 1,
    );
}
#cart#customization#images#thumbnails#woocommerce