Set the product thumbnail size and enforce whichever form of cropping gives you the consistency you’re looking for. This will let you set whatever width you prefer:
<?php
function wpse_307110_override_thumbnail_sizes() {
$theme_support = get_theme_support( 'woocommerce' );
$theme_support = is_array( $theme_support ) ? $theme_support[0] : array();
// change 150 to whatever width you need
$theme_support['thumbnail_image_width'] = 150;
remove_theme_support( 'woocommerce' );
add_theme_support( 'woocommerce', $theme_support );
}
add_action( 'after_setup_theme', 'wpse_307110_override_thumbnail_sizes', 10 );
?>
Next, to affect cropping:
Crop square: update_option( 'woocommerce_thumbnail_cropping', '1:1' );
Don’t crop at all: update_option( 'woocommerce_thumbnail_cropping', 'uncropped' );
Or crop to custom ratio:
// set width and height as needed: this creates a 4:3 ratio
// so if width is 150px, height will be 113px (112.5 rounded up)
update_option( 'woocommerce_thumbnail_cropping', 'custom' );
update_option( 'woocommerce_thumbnail_cropping_custom_width', '4' );
update_option( 'woocommerce_thumbnail_cropping_custom_height', '3' );
Then, use a plugin that regenerates all thumbnails – this will regenerate every image size for all the existing images.