Title: Prevent Purchase for WooCommerce
Author: Andrew Munro / AffiliateWP
Published: <strong>2015 年 3 月 19 日</strong>
Last modified: 2025 年 11 月 2 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/woocommerce-prevent-purchase.svg)

# Prevent Purchase for WooCommerce

 作者：[Andrew Munro / AffiliateWP](https://profiles.wordpress.org/sumobi/)

[下载](https://downloads.wordpress.org/plugin/woocommerce-prevent-purchase.1.1.0.zip)

 * [详情](https://cn.wordpress.org/plugins/woocommerce-prevent-purchase/#description)
 * [评价](https://cn.wordpress.org/plugins/woocommerce-prevent-purchase/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/woocommerce-prevent-purchase/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/woocommerce-prevent-purchase/#developers)

 [支持](https://wordpress.org/support/plugin/woocommerce-prevent-purchase/)

## 描述

This plugin requires [WooCommerce](https://wordpress.org/plugins/woocommerce/). 
It allows the site owner to prevent a product from being purchased by enabling a
checkbox. It also allows you to override the message on a per-product basis. This
will be useful for when you want to let customers know a product is only available
in-store but still have the product listed on your website.

How does it work?

This is a very simple plugin that hooks into WooCommerce’s woocommerce_is_purchasable
filter. When a product is deemed unpurchasable the “add to cart” button on the main
product listing is replaced with a “read more” button. When the customer views the
single product page they are shown a message that the product is not available for
purchase and the add to cart buttons are removed.

## 安装

 1. Unpack the entire contents of this plugin zip file into your `wp-content/plugins/`
    folder locally
 2. Upload to your site
 3. Navigate to `wp-admin/plugins.php` on your site (your WP Admin plugin page)
 4. Activate this plugin

OR you can just install it with WordPress by going to Plugins >> Add New >> and 
type this plugin’s name

Go to a product’s edit/publish screen and enable the “Prevent Purchase” checkbox.
Optionally you can enter in a custom message which is shown on the single product
page.

#### 1.1.0

 * Plugin renamed to comply with WooCommerce trademark requirements
 * Added nonce verification and security improvements
 * Improved input sanitization and output escaping

#### 1.0

 * Initial release

## 评价

![](https://secure.gravatar.com/avatar/72b345b9f539c5aed4bd0d130c74b687185a92070f4376908ee4d7a39175f74e?
s=60&d=retro&r=g)

### 󠀁[Works – Has for years](https://wordpress.org/support/topic/works-has-for-years/)󠁿

 [aehageman](https://profiles.wordpress.org/aehageman/) 2020 年 12 月 13 日

I am about to install on a second site. We have used the plugin for a long time,
years.

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/woocommerce-prevent-purchase/reviews/)

## 贡献者及开发者

「Prevent Purchase for WooCommerce」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Andrew Munro / AffiliateWP ](https://profiles.wordpress.org/sumobi/)

[帮助将「Prevent Purchase for WooCommerce」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/woocommerce-prevent-purchase)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/woocommerce-prevent-purchase/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/woocommerce-prevent-purchase/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/woocommerce-prevent-purchase/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/woocommerce-prevent-purchase/)。

## 额外信息

 *  版本 **1.1.0**
 *  最后更新：**1 年前**
 *  活跃安装数量 **70+**
 *  WordPress 版本 ** 3.3 或更高版本 **
 *  已测试的最高版本为 **6.8.12**
 *  语言
 * [English (US)](https://wordpress.org/plugins/woocommerce-prevent-purchase/)
 * 标签
 * [disable](https://cn.wordpress.org/plugins/tags/disable/)[prevent](https://cn.wordpress.org/plugins/tags/prevent/)
   [purchase](https://cn.wordpress.org/plugins/tags/purchase/)[woocommerce](https://cn.wordpress.org/plugins/tags/woocommerce/)
 *  [高级视图](https://cn.wordpress.org/plugins/woocommerce-prevent-purchase/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/woocommerce-prevent-purchase/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/woocommerce-prevent-purchase/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/woocommerce-prevent-purchase/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/woocommerce-prevent-purchase/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/woocommerce-prevent-purchase/reviews/?filter=1)

[您的评价](https://wordpress.org/support/plugin/woocommerce-prevent-purchase/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/woocommerce-prevent-purchase/reviews/)

## 贡献者

 *   [ Andrew Munro / AffiliateWP ](https://profiles.wordpress.org/sumobi/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/woocommerce-prevent-purchase/)