Title: Quick View icon
Last modified: May 27, 2021

---

# Quick View icon

 *  [chancelienne](https://wordpress.org/support/users/chancelienne/)
 * (@chancelienne)
 * [5 years ago](https://wordpress.org/support/topic/quick-view-icon/)
 * Hello,
 * I try to replace the text QuickView for the link with an eye icon in my functions.
   php file :
 *     ```
       add_filter('woosq_button_text','custom_quick_view');
       function custom_quick_view($output)
       {
        global $product;
   
        $output = '<a href="#" class="woosq-btn woosq-btn-' . esc_attr( $atts['id'] ) . ' ' . get_option( 'woosq_button_class' ) . '" data-id="' . esc_attr( $atts['id'] ) . '" data-effect="' . esc_attr( $atts['effect'] ) . '"><i class="far fa-eye"></i><span>' . esc_html( $button_text ) . '</span></a>'; 
        return $output;
       }
       ```
   
 * but it doesn’t work. Any help please ?
    Thanks.

Viewing 1 replies (of 1 total)

 *  Plugin Author [WPClever](https://wordpress.org/support/users/wpclever/)
 * (@wpclever)
 * [5 years ago](https://wordpress.org/support/topic/quick-view-icon/#post-14493578)
 * Hi [@chancelienne](https://wordpress.org/support/users/chancelienne/)
 * Please use below snippet:
 *     ```
       add_filter( 'woosq_button_html', 'woosq_custom_quick_view_btn', 99, 2 );
       function woosq_custom_quick_view_btn( $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 ) . '" class="woosq-btn woosq-btn-' . esc_attr( $product_id ) . ' ' . get_option( 'woosq_button_class' ) . '" data-id="' . esc_attr( $product_id ) . '" data-effect="' . esc_attr( get_option( 'woosq_effect', 'mfp-3d-unfold' ) ) . '"><i class="far fa-eye"></i><span>' . esc_html( $button_text ) . '</span></a>';
   
       	return $output;
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Quick View icon’ is closed to new replies.

 * ![](https://ps.w.org/woo-smart-quick-view/assets/icon-128x128.png?rev=1857803)
 * [WPC Smart Quick View for WooCommerce](https://wordpress.org/plugins/woo-smart-quick-view/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-smart-quick-view/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-smart-quick-view/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-smart-quick-view/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-smart-quick-view/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-smart-quick-view/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [WPClever](https://wordpress.org/support/users/wpclever/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/quick-view-icon/#post-14493578)
 * Status: not resolved