Image not changing in catalog mode

If you're using Flatsome catalog mode and your variable product images aren't changing when you make a selection, then you'll need to add this code to your child theme's functions.php file:

 * Add single variation field in catalog mode.
function iconic_add_variation_field() {
	if ( ! get_theme_mod( 'catalog_mode' ) ) {

	<div class="woocommerce-variation-add-to-cart variations_button">
		<input type="hidden" name="variation_id" class="variation_id" value="0" />

add_action( 'woocommerce_single_variation', 'iconic_add_variation_field', 10 );