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.
PHP Snippet: Deny Further Sales If User Has Already Purchased a Product #
This snippet will:
- Hide the ‘Add to Cart’ completely on the single product page.
- Replace the ‘Add to Cart’ on the Shop Page with ‘Read More’
- 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.