Home » Php » php – How to show a div when a product added to in woocommerce

php – How to show a div when a product added to in woocommerce

Posted by: admin February 25, 2020 Leave a comment

Questions:

i am looking for some help related to “How to show a div when a product added to in woocommerce”. When i click on add to car button, the product added to cart and show a view cart link. I want to show another div instead of view cart link.I am trying to show with jquery. Look at the code:

$(function (){
    if( $('.ajax_add_to_cart').hasClass('added') ){
        $('.custom-view-cart-notice').show();
    }
});

.custom-view-cart-notice div is display none from css. Please suggest me something that work.

How to&Answers: