Code snippet: Hide the View Cart link after adding to cart
Please note: this article is aimed at developers. We have provided an article on how to add code snippets. If you're not comfortable using them then you can use our plugin customization service.
When you're using WooCommerce Product Table, customers can add products to the cart directly from the product table. After a product is added, WooCommerce normally shows a 'View cart' link next to the add to cart button.
If you want customers to stay focused on the product table, then you can hide this link with the following CSS snippet.
Code snippet
Add this CSS to your theme or child theme, or to Appearance → Customize → Additional CSS:
.wc-product-table-wrapper a.added_to_cart.wc-forward,
.wc-product-table-wrapper .multi-cart-message a.added_to_cart.wc-forward {
display: none !important;
}
This hides the 'View cart' link that appears after adding products to the cart from a product table. It does not remove the add to cart button itself, and it does not affect the main cart link in your site header or menu.