Images not changing in The Gem theme

If you are using WooCommerce Product Configurator and  The Gem theme, you may have noticed that the images do not change when you select your product options.

In order to resolve that, we need to remove the default images and replace it with the configurator images.

Place the following snippet in your child theme's functions.php file, or use the Code Snippets plugin.

function iconic_configurator_thegem() {
    global $jckpc, $post;
  
    $configurator = get_post_meta( $post->ID, 'jckpc_enabled', true );
  
    if( $configurator !== "yes" ) {
	    return;
    }
  
    remove_action( 'thegem_woocommerce_single_product_left', 'thegem_woocommerce_single_product_gallery', 5 );
    add_action( 'thegem_woocommerce_single_product_left', array( $jckpc, 'display_product_image' ), 5 );
}

add_action( 'wp', 'iconic_configurator_thegem' );

Once you've done that, you will want to set your image width to 100% and change the layout to "None".

Still need help? Contact Us Contact Us