Last active
August 10, 2018 23:23
-
-
Save carlosonweb/617490eb26a1d0e16db926457b29314a to your computer and use it in GitHub Desktop.
Code Snippets For Beaver Themer Product Images Compatibility With Other Plugins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Compatibility issue with Elegant Product Gallery Zoon | |
// https://www.silkypress.com/elegant-product-gallery-zoom/ | |
add_filter ( "fl_theme_builder_woocommerce_template_html_woocommerce_show_product_images", function ( $func ) { | |
return 'load_product_gallery_template'; | |
} ); | |
function load_product_gallery_template() { | |
if ( in_array( 'product-gallery-zoom/product-gallery-zoom.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { | |
include_once ABSPATH . '/wp-content/plugins/product-gallery-zoom/includes/gallery-template.php'; | |
} | |
} | |
// Compatibility with WooSwipe | |
// https://wordpress.org/plugins/wooswipe/ | |
add_filter ( "fl_theme_builder_woocommerce_template_html_woocommerce_show_product_images", function( $func ){ | |
if ( function_exists( 'wooswipe_woocommerce_show_product_thumbnails') ){ | |
return 'wooswipe_woocommerce_show_product_thumbnails'; | |
} | |
return $func; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment