Porto theme compatibility fix
This article belongs to our plugin : WooCommerce Multiple Images per Variation
Porto theme has a custom structure. Its very difficult to make both compatible. so far we managed to find a workaround.
Under wp-content/themes/porto/woocommerce/single-product/
rename these two files
product-image.php
product-thumbnails.php to some other names like
product-image2.php
product-thumbnails2.php
Then use this custom js code.
jQuery( document ).ready( function( $ ) { $(document).on("click",".attachment-shop_single",function() { var src = $(this).attr("src"); $('li.woocommerce-product-gallery__image:first-child .attachment-shop_single').attr("src",src); $(this).addClass("wmvi-selected"); }); });
use this plugin to insert custom js code
https://wordpress.org/plugins/custom-css-js/
This may affect existing functionality . you can anytime rename files back to original name and remove inserted js code.