Remove default Lightbox from WooCommerce

WooCommerce has an option to disable the built in lightbox. But on the most recent versions it’s not working.

Anyway, this snippet solves the issue. If you are having problems with duplicated lightboxes paste the following code in your functions.php file.

add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );
function my_deregister_javascript() {
wp_deregister_script( 'prettyPhoto' );
wp_deregister_script( 'prettyPhoto-init' );
wp_deregister_style( 'woocommerce_prettyPhoto_css' );