I am using Wordpress version 4.5.2 and WooCommerce version 2.5.5.
After clicking on the "Add To Cart" button, one link appears "View Cart".
Can anyone help me to remove that link?
Text to remove:

Because this functionality is hard-baked into the JS of WooCommerce, you can't disable it with a filter or hook. However, after trawling through WC's code, I discovered a handy (and slightly hacky) caveat:
If you add the following empty div to the same container as your Add to Cart button, the View Cart (or View Basket if you're in the UK) link won't get added:
<div class="added_to_cart"></div>
This is because the Javascript file checks to see if an element with that class already exists:
// View cart text
if ( ! wc_add_to_cart_params.is_cart && $thisbutton.parent().find( '.added_to_cart' ).size() === 0 ) {
$thisbutton.after( ' <a href="' + wc_add_to_cart_params.cart_url + '" class="added_to_cart wc-forward" title="' +
wc_add_to_cart_params.i18n_view_cart + '">' + wc_add_to_cart_params.i18n_view_cart + '</a>' );
}
If it finds an existing .added_to_cart element, it won't try to append another.
It's worth noting that Sathyanarayanan G's answer should totally work too (and I'm surprised it didn't - that sort of points to something else being wrong), but in a slightly different way.
Adding the below line of code to your child theme's style.css should do the trick.
a.added_to_cart {display:none !important}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With