Hey, I just did something similar this morning. I changed the image to the image from my envira gallery. this is the snippet of code that did the changing, you might be able to tweak it to your needs!
add_filter( ‘woocommerce_cart_item_thumbnail’, ‘envira_woocommerce_cart_item_thumbnail’, 5, 3 );
function envira_woocommerce_cart_item_thumbnail( $image_url, $cart_item, $cart_key ) {
if ( isset( $cart_item[‘envira_woocommerce_image_id’] ) ) {
$envira_image_id = $cart_item[‘envira_woocommerce_image_id’];
return ‘‘;
} else {
return $image_url;
}
}
the full documentation for this method is here, but I believe this is the general block of code (plus some tweaks) that you’ll be needing
https://enviragallery.com/docs/how-to-customize-woocommerce-envira-galleries/