[Support request] change cart icon snippet not working properly v1.6

Home Forums Support [Support request] change cart icon snippet not working properly v1.6

Home Forums Support change cart icon snippet not working properly v1.6

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #532991
    mike

    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

    GeneratePress 2.0.2
    GP Premium 1.6
    #533215
    Tom
    Lead Developer
    Lead Developer

    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;
    }
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.