Use below code in functions.php or in your custom plugin

add_filter( 'woocommerce_get_image_size_thumbnail', 'ci_theme_override_woocommerce_image_size_thumbnail' );
function ci_theme_override_woocommerce_image_size_thumbnail( $size ) {
    // Catalog images: specific size
    return array(
        'width'  => 300,
        'height' => 300,
        'crop'   => 0, // not cropped
    );
}