I created my own button for adding a product to the cart by analogy with a button that is called using a shortcode. So the fact is that after adding the product to the cart there appears a link to go to the cart itself. I would like to remove this link.

Here is the code for my button:

<a href="/wordpress/?removed_item=1&add-to-cart=132" data-product_id="132" class="button add_to_cart_button ajax_add_to_cart order active">В корзину</a> 

Of course, I can hide it with css, but it seems to me that this is not correct and that there is a more elegant way.

Ps I used search engine to find a solution, but I could not find an answer. In any case, thank you for your attention :)

  • Another thought was to delete this element from the DOM using js. - olishevskyalex

1 answer 1

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