Support » Plugin: WooCommerce » remove “View Cart”

  • Resolved daitarn3

    (@daitarn3)


    hello, when I add a product to the cart, a “view cart” link appears.
    how can i remove that writing?
    thank you

Viewing 9 replies - 1 through 9 (of 9 total)
  • This filter here removes the added to cart message and the link to view cart
    add_filter( 'wc_add_to_cart_message_html', '__return_null' );

    Plugin Support yukikatayama

    (@yukikatayama)

    Automattic Happiness Engineer

    @daitarn3, we’ve not heard back so it sounds like the filter @braehler has provided worked.

    Closing this thread for now!

    daitarn3

    (@daitarn3)

    does not work !

    Plugin Support Three Sons

    (@3sonsdevelopment)

    Hi @daitarn3,

    Sorry to hear that it didn’t work for you. Can you send over the URL to your store so we can take a look?

    Thanks

    https://bioenergologia.webmsv.net/store/

    thanks

    • This reply was modified 7 months, 1 week ago by daitarn3.
    Plugin Support Three Sons

    (@3sonsdevelopment)

    Hello @daitarn3,

    Thanks for sending over the URL. Typically the “View Cart” message is inside a WooCommerce notification. In this case, the theme adds a separate “View Cart” message next to the “Add to cart” button. We can hide it with some custom CSS. Here’s how:

    1. In your WordPress dashboard, go to Appearance and click on Customize. 
    2. Look down for the Additional CSS section and click on it. 
    3. In the box there, paste this at the bottom:
      
      a[title="View cart"] {
          display: none;
      }
      
    4. Publish your changes. 

    When I tried adding that snippet to your site, it did hide the “View Cart” message. See if that works for you.

    Best

    does not work

    Plugin Support Three Sons

    (@3sonsdevelopment)

    Hi @daitarn3,

    That is curious. The HTML here was totally different yesterday. Here’s a screenshot of the code I’m seeing today for reference. This is after the item has been added to the cart.

    remove text

    Here’s the snippet I used this time around to remove the text:

    
    a.added_to_cart.wc-forward {
        display: none;
    }
    

    Best

    daitarn3

    (@daitarn3)

    now works !!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘remove “View Cart”’ is closed to new replies.