Rehub Theme

Some themes may change the WooCommerce structure removing the hooks needed to for SVI to properly replace the gallery. Below you will find the fix that shoudl be applied to your child themes function.php.

add_action('rh_woo_after_single_image', 'load_svi', 100);
add_action('wp_head', 'hide_original_gallery', 100);

function hide_original_gallery()
{
	if (!is_product())
		return;
	echo "";
}
function load_svi()
{
	if (!is_product())
		return;
	$plugin = new Smart_Variations_Images();
	$plugin->run();
	$plugin_public = new Smart_Variations_Images_Public('svi', '5.0.16', $plugin->options);
	$plugin_public->render_frontend();
}