Skip to content

Instantly share code, notes, and snippets.

@wpbean
Created December 21, 2016 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpbean/a91ad6957a2e63d74af4a200dbd9d517 to your computer and use it in GitHub Desktop.
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.
<?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