Change icon on "Add to cart" button

Hi Guys.

Found this awesome little code snippet you provided for another user. It changes the “add to cart” function on products page to “View Product”. Basically removes the add to cart function.

What I would love to do is put a mag glass icon next to the label. (Like shopping cart icon on Add to cart button.)

The code snippet is…

add_filter(‘woocommerce_loop_add_to_cart_link’, ‘my_add_cart_button’, 999);

function my_add_cart_button ( $button ) {

return ‘’.__(‘view product’, ‘x’).’’;

}

Cheers

Hi @gimmechefs,

Thank you for writing in, we don’t really provide customization, but feel free to add the custom CSS below on the Theme Options > CSS

.woocommerce .button.product_type_simple:before,
.woocommerce .button.single_add_to_cart_button:before {
    content: "\f0f4";
}

Please keep in mind that further customization from here would fall outside of the support that we can offer.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.