Cart REST API for WooCommerce – CoCart Lite


Building a headless store with the current WooCommerce REST API is kind of great, except, it’s missing one side of a store. The front side. 👕

See when your building a headless store, you want the ability to display your products so your customers can add them to the cart, 🛒 without the authentication roadblocks. 🔓 No need to force customers to register first. 🖊

So when you request to show your products in your app. Look! Your products are showing! 😀

But when your building a headless store with WooCommerce’s REST API, your only options are for the backend, not the frontend. 😭

It’s hard to build a store that way.

Now there’s CoCart. With CoCart you can build your headless store with the right REST API, for the frontend.

So if you want to display products by a category, go ahead, you can do it. 👍 All requests can be made in any code language and everything is completely customizable from the parameters, filters and action hooks.

So now building a headless WooCommerce store really is possible, only a whole lot easier.

CoCart. The fastest and easiest way to building headless WooCommerce stores.


  • Add products to the cart.
  • Update items in the cart.
  • Remove items from the cart.
  • Restore items to the cart.
  • Calculate the totals.
  • Get the cart totals.
  • View the cart contents.
  • Get the item count.
  • Empty the cart.
  • Supports authentication via WooCommerce’s method.

CoCart Pro

This plugin is just the tip of the iceberg. Want the full cart experience? CoCart Pro completes it by supporting the following features:

  • Add and Remove Coupons to Cart
  • Get Applied Coupons
  • Get Coupon Discount Total
  • Get Cart Total Weight
  • Get Cross Sells
  • Get and Set Payment Method
  • Get and Set Shipping Methods
  • Get and Set Fees
  • Calculate Shipping Fees
  • Calculate Totals and Fees

Buy CoCart Pro Now

Extensions supported

CoCart also works well with official WooCommerce extensions such as:

More extensions are supported in CoCart Pro:

Give CoCart a try.

Want to unlock more? Upgrade to the Pro version.

Join our growing community

A Slack community for developers, WordPress agencies and shop owners building the fastest and best headless WooCommerce stores with CoCart.

Join our community

Built with developers in mind

Extensible, adaptable, and open source — CoCart is created with developers in mind. If you’re interested to jump in the project, there are opportunities for developers at all levels to get involved. Contribute to CoCart on GitHub and join the party.

More information


This plugin is created by Sébastien Dumont.


  • Empty Cart
  • Viewing the carts content without product thumbnail.
  • Viewing the carts content with product thumbnail.


Minimum Requirements

Visit the WooCommerce server requirements documentation for a detailed list of server requirements.

Automatic installation

Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of CoCart, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.

In the search field type „CoCart“ and click Search Plugins. Once you’ve found the plugin you can view details about it such as the point release, rating and description. Most importantly of course, you can install it by simply clicking „Install Now“.

Manual installation

The manual installation method involves downloading the plugin and uploading it to your webserver via your favourite FTP application. The WordPress codex contains instructions on how to do this here.


Automatic updates should work like a charm; as always though, ensure you backup your site just in case.


Is CoCart free?

Yes! CoCart’s core features are absolutely free. CoCart Pro completes the full cart experience!

How do I start using CoCart?

You will first need WooCommerce v3.6 or higher installed with the REST API enabled. Then install CoCart and follow the documentation. That’s it!

Who should use CoCart?

CoCart is perfect for store owners and developers. If you want to create an e-commerce app for mobile or a custom frontend shopping experience completely using the REST API, then you need to use CoCart.

Do I need to have coding skills to use CoCart?

As this plugin is built for developers you will need to have some coding knowledge to use it. Checkout the documentation to get some understanding.

Where can I find documentation for CoCart?

The documentation for CoCart can be found here.

Can I change the layout format/add/change details to the responses?

You certainly can. Filters are available to do just that (so long as you are using version 2.0+). Checkout the tweaks plugin to view or maybe use the examples provided.

Does it work with any of the official WooCommerce libraries?

Only if you request your customers to be logged in first. This is because all the official libraries require authentication which the cart does not require.

Can I view any customers cart?

Yes but only those with administrator capabilities can and if persistent cart was left enabled. – See documentation for more information.

Are you a Mobile app developer? In preparation for CoCart v2.1.0, support for storing cart data will be introduced to make it easier to access specific carts created and your feedback is needed. Read this article for more details.

Where can I report bugs or contribute to the project?

Report bugs on the CoCart GitHub repository.

Is CoCart translatable?

Yes! CoCart is deployed with full translation and localization support via the ‘cart-rest-api-for-woocommerce’ text-domain.

Where can I ask for help?

If you get stuck, you can ask for help in the CoCart support forum.


17. Dezember 2019
Thanks for doing such a great work with this! Works exactly as expected and CoCart seems to have a nice community around it. The founder seems really devoted and that's one of the key things for a plugin like this to live on and get the right updates in the future. We just got ourselfs the lifetime subscription.
22. November 2019
The plugin works very well. It really saved me time using the REST API to update the total number of products in the cart when someone adds a new item to the cart
18. April 2019
I used this plugin for a mobile app project I have been working on and first off the documentation was very easy to follow. I had no issues getting it working and it integrated with JWT Authentication out of the box. Unfortunately, Woocommerce 3.6 came out and pretty much broke the plugin due to how they were now implementing certain things. I posted on the forums and in a few hours I got a response from the author. He was very understanding and gave a suggestion on what to do for the time being until he implemented a fix. A few hours later, he released a pre-release update which fixed the issue. TL:DR; Great plugin, Great support and will highly recommend this plugin to anyone who needs to access Woocommerce cart through a rest API.
13. November 2018
This plugin works great out of the box for adding products to the Woo cart via API. The code is solid and functionality is as expected, thanks Sebastien!
23. Oktober 2018
Very nice plugin. For fast development.
Lies alle 9 Rezensionen

Mitwirkende & Entwickler

„Cart REST API for WooCommerce – CoCart Lite“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:



v2.0.6 – 1st October, 2019

  • Added: Link to translate CoCart on the plugin row.
  • Tweaked: Upgrade admin notice for next release.
  • Tweaked: URL to latest beta news under the plugin row.

v2.0.5 – 14th September, 2019

  • Added: Support for WooCommerce’s authentication method.

v2.0.4 – 26th August, 2019

  • Added: More FAQ’s to readme.txt file for the WordPress plugin directory.
  • Changed: Title of the plugin in readme.txt file to improve SEO Results.
  • Changed: Minimum WooCommerce version required and supported is v3.6.
  • Tweaked: Upgrade link now shows always once plugin is installed, not after 1 week.
  • Tweaked: Upgrade link colour changed from green to red to stand out more.

v2.0.3 – 19th August, 2019

  • Added: A notice under the plugin row providing information on future versions coming that require your feedback.
  • Tested: Compatible with WooCommerce v3.7
  • Tweaked: Admin body class for CoCart page.
  • Updated: Documentation URL has changed to

v2.0.2 – 19th July, 2019

  • Tweaked: Updated link to getting started page if CoCart was installed via WP-CLI.

v2.0.1 – 18th July, 2019

  • Tweaked: get_cart_contents_count() is now called static.
  • Tweaked: Added check for cart totals to make sure they are set before falling back to cart totals in session.
  • Dev: Added filter cocart_update_item for the response when updating an item.
  • Dev: Tweaked CoCart page in the WordPress dashboard to support sections.

v2.0.0 – 3rd July, 2019

  • NEW: REST API namespace. CoCart is now an individual API and is no longer nested with WooCommerce’s core REST API.
  • NEW: Check to see if the cart is set before falling back to the cart in session if one exists.
  • NEW: Get a specific customers cart via their customer ID number. – See documentation for details.
  • NEW: Product title also returns besides just the product name when getting the cart.
  • NEW: Product price also returns when getting the cart.
  • Changed: Filter and Action Hook names in new API. – See documentation for details.
  • Improved: Complexity of functions for better performance and usage.
  • Tweaked: Added checking for items already in the cart.
  • Tweaked: Check if cart is empty before removing an item.
  • Tweaked: Responses for adding, updating, removing and restoring items to return whole cart if requested.
  • Tweaked: Responses for updating items to return the quantity of item along with message.
  • Tweaked: Totals can now return once calculated if requested.
  • Tweaked: Totals now return from session and can be returned pre-formatted if requested. – See documentation for details.
  • Tweaked: New option to refresh cart totals once item has been added or updated.
  • Dev: Added action hooks for getting cart, cart is cleared, item added, item removed and item restored.
  • Dev: Added filter to allow additional checks before the item is added to the cart.
  • Dev: Added filter to apply additional data to return when cart is returned.
  • Dev: Added filter to change the size of the thumbnail returned.
  • Dev: Added new option to return cart raw if requested.

View the full changelog here.