CoCart brings everything you need to build fast and flexible headless stores.

Installs: 169

Dependents: 0

Suggesters: 0

Security: 0

Stars: 346

Watchers: 13

Forks: 64

Open Issues: 8



v4.0.0-beta.3 2023-08-10 04:19 UTC

This package is auto-updated.

Last update: 2023-12-08 16:58:49 UTC


CoCart. Build headless stores, without building an API

Licence Latest Stable Version WordPress Plugin Downloads rating

⚠️ This is the development branch of CoCart. For current stable branch browse trunk. ⚠️

Welcome to the CoCart repository on GitHub. Here you can browse the source of the plugin and packages used in the development of the core of CoCart plugin.

We recommend all developers to follow the CoCart development blog to stay up to date about everything happening in the project. You can also follow @cocartapi on Twitter for the latest development updates.

If you are looking for documentation, head over here:

Click here to download the latest release package of CoCart.

What does it provide?

CoCart provides support for managing the user session, alternative options for doing this task do exist; however, their usage can be limited to applications of the same origin as the WordPress installation. This is due to WooCommerce using cookies to store user session tokens.

Getting Started

📢 This repo is not package ready and must be built in order to activate the plugin. To begin you will need to make sure that you have installed all of the modules.

Step 1

Clone the repo to your WordPress development wp-content/plugins folder. Don't forget the folder name "cocart-dev" at the end of the command. This will keep your development build separate from the plugin build.

git clone cocart-dev

Step 2

Then go into the cloned folder cd cocart-dev and proceed with the following commands.

⚠️ It's important that you run the first command correctly as is otherwise it ruins the rest of the process and you will have to start again.

npm install
composer install
composer install-cocart

At this point you are now ready to begin developing and testing.

Now you will have another folder cocart within your plugins folder. This makes CoCart package ready. You will then be able to activate it from your WordPress Dashboard > Plugins.

If you have contributed changes to any part of CoCart, make sure that you have kept a backup copy before running any composer command and if you want to test those changes locally, simply run composer prep-test-build and CoCart will be packaged together for you again.

Updating CoCart Packages

As CoCart is now built modular, to keep up to date with all the development changes in all the default set modules you will need to pull them from their individual repositories.

composer update
composer update-cocart

This will pull the master branch of each package which is the development branch unless a tag is specified instead.

External Packages

Are you looking to build your own package?

For Developers

Here are a few other resources you may find helpful.

  • CoCart Beta Tester allows you to test with bleeding edge versions of CoCart from the GitHub repo.
  • CoCart VSCode extension for Visual Studio Code adds snippets and autocompletion of functions, classes and hooks.
  • CoCart Carts in Session allows you to view all the carts in session via the WordPress admin.
  • CoCart Product Support Boilerplate provides a basic boilerplate for supporting a different product type to add to the cart with validation including adding your own parameters.
  • CoCart Cart Callback Example provides you an example of registering a callback that can be triggered when updating the cart.
  • CoCart Settings Example provides an example of adding your own settings to CoCart. Requires CoCart 4.0+
  • CoCart Tweaks provides a starting point for developers to tweak CoCart to their needs.


This repository is not suitable for support. Please don't use our issue tracker for support requests, but for core CoCart issues only. Support can take place through the appropriate channels:

Support requests in issues on this repository will be closed on sight.

CoCart is not supported via the WooCommerce help desk as the plugin is not sold via, the support team at is not familiar with it and may not be able to assist.


Check out the roadmap to get informed of the latest features released and the upcoming ones.

CoCart Channels

We have different channels at your disposal where you can find information about the CoCart project, discuss it and get involved:

Twitter: cocartapi CoCart Github Stars

  • 📖 Docs: this is the place to learn how to use CoCart API. Get started!
  • 🧰 Resources: this is the hub of all CoCart resources to help you build a headless store. Get resources!
  • 👪 Community: use our Discord chat room to share any doubts, feedback and meet great people. This is your place too to share how are you planning to use CoCart!
  • 🐞 GitHub: we use GitHub for bugs and pull requests, doubts are solved with the community.
  • 🐦 Social media: a more informal place to interact with CoCart users, reach out to us on Twitter.
  • 💌 Newsletter: do you want to receive the latest plugin updates and news? Subscribe here.

Contributing to CoCart

If you have a patch or have stumbled upon an issue with CoCart, you can contribute this back to the code. Please read our contributor guidelines for more information how you can do this.

Join the Community

Do you like the idea of creating a headless e-commerce with WooCommerce? Have questions or feedback? We'd love to hear from you. Come join the CoCart community! ❤️


CoCart is developed and maintained by Sébastien Dumont.

Founder of CoCart - Sébastien Dumont.

Website  ·  GitHub @seb86  ·  Twitter @sebd86