Created
December 21, 2016 02:25
-
-
Save wpbean/a91ad6957a2e63d74af4a200dbd9d517 to your computer and use it in GitHub Desktop.
WPB WooCommerce LightBox free version, remove default quick view button and link quick view to full product. It will replace the product link with quick view.
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 | |
/* | |
* WPB WooCommerce LightBox free version, remove default quick view button and link quick view to full product. | |
* It will replace the product link with quick view. | |
*/ | |
remove_action( 'woocommerce_after_shop_loop_item','wpb_wl_hook_quickview_link', 11 ); | |
remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 ); | |
add_action( 'woocommerce_before_shop_loop_item', 'wpb_wl_woocommerce_template_loop_product_link_open', 10 ); | |
function wpb_wl_woocommerce_template_loop_product_link_open(){ | |
echo '<a class="wpb_wl_preview open-popup-link" href="#wpb_wl_quick_view_'.get_the_id().'" data-effect="mfp-zoom-in">'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment