Replace quick view button with magnify icon
-
Hello and thank you for this great plugin. I love your plugins and I am currently using multiple of them.
I am currently trying to replace the “Quick View” button with a magnify or eye icon. I am using the code below. It works well but it automatically redirects to the product page once you click on the icon. This never happens when I use quick view button.
Anytime you click on the icon, the popup will open but it goes to product page automatically.Thank you in advance.
add_filter( 'woosq_button_html', 'replace_quick_view_button_text_with_icon', 99, 2 ); function replace_quick_view_button_text_with_icon( $output, $product_id ) { $button_text = get_option( 'woosq_button_text' ); if ( empty( $button_text ) ) {$button_text = esc_html__( 'Quick view', 'woosq' );} $output = '<a href="' . get_permalink( $product_id ) . '"><i class="fa fa-search"></i><span></span></a>'; return $output; }
- This topic was modified 2 years, 7 months ago by .
- This topic was modified 2 years, 7 months ago by .
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Replace quick view button with magnify icon’ is closed to new replies.