Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Iván Sosa

    (@ivansosa)

    Hi there,

    could you share a screenshot where exactly you want to add an icon?

    Thanks for your cooperation.

    Thread Starter sinha31

    (@sinha31)

    nevermind i managed to add icon before quick view text using below code snippet

    i wanted to add eye icon just before Quick View text inside quick view button on shop page

    add_action('yith_add_quick_view_button_html','yith_add_quick_view_button_html_function',10,3);
    
    function yith_add_quick_view_button_html_function($button, $label, $product) {
    	
    	global $product;
    
    			if (  $product instanceof WC_Product ) {
    				$product_id = $product->get_id();
    			}
    
    			
    
    			$button = '';
    			if ( $product_id ) {
    				if ( ! $label ) {
    					$label = $this->get_button_label();
    				}
    
    				$button = '<a href="#" class="button yith-wcqv-button" data-product_id="' . esc_attr( $product_id ) . '"><span class="wcva_custom_dash dashicons dashicons-welcome-view-site"></span> ' . $label . '</a>';
    				
    			}
    	    return $button ;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display Icon in button text’ is closed to new replies.