craftpeak/woocommerce-prevent-repeat-purchases
Composer 安装命令:
composer require craftpeak/woocommerce-prevent-repeat-purchases
包简介
A WooCommerce plugin to prevent customers from purchasing products more than once. Only works with Simple products.
关键字:
README 文档
README
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:
add_filter( 'wc_repeat_nonpurchaseable_message', function() { return "Ya can't have it AGAIN!"; } );
统计信息
- 总下载量: 1.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2018-08-15