Hello,
Yes, it’s possible. We just need to add a small JavaScript snippet to trigger the lightbox on image click and then hide the icon using CSS.
Please add following code to function.php file of your active theme.
If you want to add a code snippet without having to edit your theme’s functions.php file? Use a use Code Snippets plugin instead.
add_action('wp_footer','nickx_wp_footer_callback');
function nickx_wp_footer_callback() {
if( is_product() ) { ?>
<script type="text/javascript">
jQuery(".nickx-slider.nickx-slider-for").on('click','.nswiper-slide-active img', function(e){
jQuery('.nickx-slider.nickx-slider-for .nswiper-slide-active span').click();
return false;
});
</script>
<style type="text/css">
.nswiper-slide-active span{
opacity: 0 !important;
visibility: hidden !important;
}
</style>
<?php
}
}
Thank You.