Display Icon in button text

Hi there,

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

Thanks for your cooperation.

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 ;
}

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer