Title: Allow Only Last Item In Cart
Author: Savan Dholu
Published: <strong>2021 年 7 月 13 日</strong>
Last modified: 2021 年 11 月 8 日

---

搜索插件

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

![](https://ps.w.org/allow-only-last-item-in-cart/assets/icon-128x128.png?rev=2563187)

# Allow Only Last Item In Cart

 作者：[Savan Dholu](https://profiles.wordpress.org/savan91/)

[下载](https://downloads.wordpress.org/plugin/allow-only-last-item-in-cart.zip)

 * [详情](https://cn.wordpress.org/plugins/allow-only-last-item-in-cart/#description)
 * [评价](https://cn.wordpress.org/plugins/allow-only-last-item-in-cart/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/allow-only-last-item-in-cart/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/allow-only-last-item-in-cart/#developers)

 [支持](https://wordpress.org/support/plugin/allow-only-last-item-in-cart/)

## 描述

This Plugin gives you the functionality when the user clicks on Add to Cart button
it will clear all previous cart data entirely and add new cart data, only allow 
one product purchase at a time.

## 安装

Upload the allow_only_last_item_in_cart plugin to your plugin directory, activate
it

For backwards compatibility, if this section is missing, the full length of the 
short description will be used, and
 Markdown parsed.

e.g.

 1. Upload `allow_only_last_item_in_cart.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Place `<?php do_action('allow_only_last_item_in_cart'); ?>` in your templates

A few notes about the sections above:

 * “Contributors” is a comma separated list of wordpress.org usernames
 * “Tags” is a comma separated list of tags that apply to the plugin
 * “Requires at least” is the lowest version that the plugin will work on
 * “Tested up to” is the highest version that you’ve _successfully used to test 
   the plugin_. Note that it might work on
    higher versions… this is just the highest
   one you’ve verified.
 * Stable tag should indicate the Subversion “tag” of the latest stable version,
   or “trunk,” if you use `/trunk/` for
    stable.
 * Note that the `readme.txt` of the stable tag is the one that is considered the
   defining one for the plugin, so
    if the `/trunk/readme.txt` file says that the
   stable tag is `4.3`, then it is `/tags/4.3/readme.txt` that’ll be used for displaying
   information about the plugin. In this situation, the only thing considered from
   the trunk `readme.txt` is the stable tag pointer. Thus, if you develop in trunk,
   you can update the trunk `readme.txt` to reflect changes in your in-development
   version, without having that information incorrectly disclosed about the current
   stable version that lacks those changes — as long as the trunk’s `readme.txt`
   points to the correct stable tag.
 * If no stable tag is provided, it is assumed that trunk is stable, but you should
   specify “trunk” if that’s where
    you put the stable version, in order to eliminate
   any doubt.

## 评价

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

### 󠀁[An Amazing Plugin](https://wordpress.org/support/topic/an-amazing-plugin-33/)󠁿

 [Savan Dholu](https://profiles.wordpress.org/savan91/) 2021 年 9 月 1 日

Just added working automatically Relevant and Better!!

 [ 阅读所有4条评价 ](https://wordpress.org/support/plugin/allow-only-last-item-in-cart/reviews/)

## 贡献者及开发者

「Allow Only Last Item In Cart」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Savan Dholu ](https://profiles.wordpress.org/savan91/)

[帮助将「Allow Only Last Item In Cart」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/allow-only-last-item-in-cart)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0

 * A change since the previous version.
 * Another change.

#### 0.5

 * List versions from most recent at top to oldest at bottom.

## 额外信息

 *  版本 **1.0.0**
 *  最后更新：**5 年前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 5.7 或更高版本 **
 *  已测试的最高版本为 **5.7.20**
 *  PHP 版本 ** 7.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/allow-only-last-item-in-cart/)
 * 标签
 * [comments](https://cn.wordpress.org/plugins/tags/comments/)[spam](https://cn.wordpress.org/plugins/tags/spam/)
 *  [高级视图](https://cn.wordpress.org/plugins/allow-only-last-item-in-cart/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/allow-only-last-item-in-cart/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/allow-only-last-item-in-cart/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/allow-only-last-item-in-cart/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/allow-only-last-item-in-cart/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/allow-only-last-item-in-cart/reviews/?filter=1)

[您的评价](https://wordpress.org/support/plugin/allow-only-last-item-in-cart/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/allow-only-last-item-in-cart/reviews/)

## 贡献者

 *   [ Savan Dholu ](https://profiles.wordpress.org/savan91/)

## 支持

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

 [查看支持论坛](https://wordpress.org/support/plugin/allow-only-last-item-in-cart/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.virtualheight.com/)