Skip to content

Instantly share code, notes, and snippets.

@carlosonweb
Last active August 10, 2018 23:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosonweb/617490eb26a1d0e16db926457b29314a to your computer and use it in GitHub Desktop.
Save carlosonweb/617490eb26a1d0e16db926457b29314a to your computer and use it in GitHub Desktop.
Code Snippets For Beaver Themer Product Images Compatibility With Other Plugins
<?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