Title: Empty cart before adding
Last modified: August 31, 2017

---

# Empty cart before adding

 *  [dageci](https://wordpress.org/support/users/dageci/)
 * (@dageci)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/empty-cart-before-adding/)
 * Hello,
    Thank you for creating this nice plugin. Is there a way to first empty
   the cart if there is anything in it before the button adds the product. So if
   the product can be sold only in quantity of 1 and that the previous cart entries
   get erased.
 * Davor

Viewing 1 replies (of 1 total)

 *  [kopal](https://wordpress.org/support/users/kopal/)
 * (@kopal)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/empty-cart-before-adding/#post-9621949)
 * Hi,
 * I also need this feature, if it is possible.
    I would like use only the quick
   buy function on our site and redirect the customer right to the Checkout page,
   and never use the cart page. Like on this page: [https://www.admincolumns.com/pricing-purchase/](https://www.admincolumns.com/pricing-purchase/)
 * If the customer place a product into the cart, and redirected to the checkout
   page, but he does not buy the product, then the next time when he choose a product,
   the previous product should be removed from the cart.
    This is important because
   if we do not use the cart page on the site, there is not any possibility to remove
   any previously added product from the cart.
 * The following code is useful for this reason: [https://stackoverflow.com/a/27031767](https://stackoverflow.com/a/27031767)
   
   This code can be applied independently of this plugin, but it would be more comfortable
   if it was a built in function.
 * Maybe it can be switch on/off globally, or just for specific shortcode buttons
   using a shortcode parameter.
 * Thanks in advance,
    Pal

Viewing 1 replies (of 1 total)

The topic ‘Empty cart before adding’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-quick-buy/assets/icon-256x256.jpg?rev=2157616)
 * [Quick Buy For Woocommerce](https://wordpress.org/plugins/woocommerce-quick-buy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-quick-buy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-quick-buy/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-quick-buy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-quick-buy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-quick-buy/reviews/)

## Tags

 * [empty cart](https://wordpress.org/support/topic-tag/empty-cart/)

 * 1 reply
 * 2 participants
 * Last reply from: [kopal](https://wordpress.org/support/users/kopal/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/empty-cart-before-adding/#post-9621949)
 * Status: not resolved