Download the PHP package craftpeak/woocommerce-prevent-repeat-purchases without Composer
On this page you can find all versions of the php package craftpeak/woocommerce-prevent-repeat-purchases. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download craftpeak/woocommerce-prevent-repeat-purchases
More information about craftpeak/woocommerce-prevent-repeat-purchases
Files in craftpeak/woocommerce-prevent-repeat-purchases
Package woocommerce-prevent-repeat-purchases
Short Description A WooCommerce plugin to prevent customers from purchasing products more than once. Only works with Simple products.
License GPL-3.0+
Homepage https://github.com/Craftpeak/woocommerce-prevent-repeat-purchases/
Informations about the package woocommerce-prevent-repeat-purchases
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 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: