WooCommerce Prevent Repeat Purchases
Simple plugin to prevent customers from making repeat purchases of a product.
by Craftpeak · github.com/craftpeak/woocommerce-prevent-repeat-purchases · website
★ 6stars
1.3kcomposer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/craftpeak/woocommerce-prevent-repeat-purchases/archive/refs/heads/master.zipAlso on Packagist as craftpeak/woocommerce-prevent-repeat-purchases:
composer require craftpeak/woocommerce-prevent-repeat-purchasesFrom the readme
WooCommerce Prevent Repeat Purchases
A WooCommerce plugin to prevent customers from purchasing products more than once.
This only works with Simple products!!
Requirements
- WooCommerce
- PHP 7+ (not actually, but don't be that person)
Installation
composer require craftpeak/woocommerce-prevent-repeat-purchases
(or do it the old fashioned way)
Setup
For Simple products, there is a "Prevent Repeat Purchases?" checkbox in the "General" product metabox. If checked,
customers will only be able to purchase the product once (per account). This works via the wccustomerboughtproduct
function, and is set on a product-by-product basis.
Customization
If you would like to change the message showed to users when they can't make a repeat purchase, use the
wcrepeatnonpurchaseablemessage filter, for example:
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.