Display “Product already in cart” instead of “add to cart” button

By: Prem Tiwari | Last Updated: | In: WordPress Snippets


If you are looking for changing the “Add to cart” button to something like “product already in cart” if that product is already in customer cart, then this tutorial is for you. I am going to share how to display “product already in cart” instead of “add to cart” button in WooCommerce single product page.

Display

Display “product already in cart” instead of “add to cart” button

Copy the below code and add at the end of your functions.php file.

Share this post!


About: Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


Tags: , , , , , ,