Support » Plugin: WPC Smart Quick View for WooCommerce » Replace or hide quick view with the icon on the image

  • Hello dear, thank you for your great plugin, but i found i problem for my setting, i don’t know how to hide the quick view button and add only the icon on the image, can you may help me please?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • You may try to add this code to your function.php file. This will replace the “Quick View” with an icon.

    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 = '<button 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')).'" data-context="default"><i class="far fa-eye"></i></button>';
    	return $output;
    Thread Starter nicostab


    Dear @gharchi thank you very much for your answer, i’m sorry about but this code doesen’t work for my website…i don’t know why, can we find out another solution maybe?

    Thank you

    Hey @nicostab

    I am not in the support team, just wanted to help.
    As I checked the link you shared, it is the category of products then there is quick view text on each product.

    I am not sure what you are exactly looking for. But if you want to change the text with icon then the code above should do the job. You may change the code based on what you are looking for.
    If you want to have the “Quick View” button on the image then you simply need to add some CSS to the button like “position:absoulute;” and add some other CSS properties to make it as you want.

    Thread Starter nicostab


    Dear @gharchi yes i would like to remove the button/text quickview, and show the icon on the corner of the image, but i copy and past your code on my funcion file of the astra theme, but it doesn’t work…may i did something wronge?

    Thank you for your support

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Replace or hide quick view with the icon on the image’ is closed to new replies.