WooCommerce Prevent Repeat Purchases WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
Simple plugin to prevent customers from making repeat purchases of a product.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/craftpeak/woocommerce-prevent-repeat-purchases/archive/refs/heads/master.zipOn Packagist as craftpeak/woocommerce-prevent-repeat-purchases:
composer require craftpeak/woocommerce-prevent-repeat-purchasesA 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 wc_customer_bought_product
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
wc_repeat_nonpurchaseable_message filter, for example:
add_filter( 'wc_repeat_nonpurchaseable_message', function() {
return "Ya can't have it AGAIN!";
} );Releases
2 releases.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.