[Resolved] Double icon for the shopping cart

Home Forums Support [Resolved] Double icon for the shopping cart

Home Forums Support Double icon for the shopping cart

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1436285
    Eric

    Hello,
    I want to change the default icon for the shopping cart using your filter :

    add_filter( ‘generate_woocommerce_menu_cart_icon’, ‘tu_change_wc_menu_cart_icon’ );
    function tu_change_wc_menu_cart_icon() {
    return ‘<i class=”fas fa-shopping-bag”></i>’;
    }
    But now I have got 2 icons, the standard one is still there. Thanks for your support

    #1436541
    David
    Staff
    Customer Support

    Hi there,

    try Customizer > General and change the Icon Type to SVG.

    #1436603
    Eric

    Hi David,
    Thanks but it doesn’t work…

    #1436616
    David
    Staff
    Customer Support

    Can you try adding / removing an item from the Menu Cart. Woo caches this – which maybe the issue.
    Let us know.

    #1436815
    Eric

    Ok, when I will be on the single page. I will inform you
    Thanks

    #1436907
    David
    Staff
    Customer Support

    Ok – let us know ๐Ÿ™‚

    #1510953
    Branislav Pakic

    I have the same problem. I tried adding and removing an item from the cart, but two icons are still present:
    inspector screenshot

    #1511223
    David
    Staff
    Customer Support

    Hi there,

    can you start a new topic where you can share a link to your site, as your issue is different to the above ( the second icon is a Font Awesome icon – which GP doesn’t use, so it must be added by another plugin or function ).

    #1511276
    Branislav Pakic

    Actually, it’s the same issue. I forgot to mention that I added the second icon using the same filter as in the original post.

    #1511511
    Tom
    Lead Developer
    Lead Developer

    So are you wanting to use the custom Font Awesome icon instead of the SVG?

    If so, you can do this:

    .wc-menu-item .gp-icon {
        display: none;
    }
    #1511621
    Branislav Pakic

    Yes, that’s exactly what I want to do. Thanks for the tip.

    #1512688
    Tom
    Lead Developer
    Lead Developer

    No problem ๐Ÿ™‚

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.