WooCommerce: Hide ‘Add to Cart’ if already purchased

By default, the WooCommerce process will show the ‘Add to Card’ button even if the product has already been purchased. We understand that this may be confusing to your viewers as they may not be familiar with how WooCommerce works and they may go to purchase the products again.

Therefore, we have found a way to make this process less confusing with this set up where the ‘Add to Card’ button will become ‘Read more’ in the shop page, and once you click on the actualy product, there will be no button, only the price.

Shop page: ‘Add to Cart’ button replaced with ‘Read more’.
Single Product Page: ‘Add to Cart’ button removed completely.

PHP Snippet: Deny Further Sales If User Has Already Purchased a Product #

This snippet will:

  1. Hide the ‘Add to Cart’ completely on the single product page.
  2. Replace the ‘Add to Cart’ on the Shop Page with ‘Read More’
  3. Make it impossible to add the item to cart even with an URL – it will show a red “Sorry, this product cannot be purchased.” error.