Archived topic
change cart icon snippet not working properly v1.6
1 reply · Started by mike on March 27, 2018
Viewing posts 1–2 of 2
Hi,
I have added this filter:
add_filter( 'generate_woocommerce_menu_cart_icon', 'tu_change_wc_menu_cart_icon' );
function tu_change_wc_menu_cart_icon() {
return '<i class="fa fa-shopping-basket" aria-hidden="true"></i>';
}
It adds the icon - but doesn't remove the old one - so there are 2 icons instead of 1
Thanks
The default icon now uses a pseudo selector, so you would have to do this to remove it:
.main-navigation a.cart-contents:before {
display: none;
}
This archived topic is closed to new replies.