co cart

🛒 CoCart's developer-friendly REST API integrates with WooCommerce to decouple your storefront and convert it blazing-fast, build in any web framework.

380
65
PHP

CoCart API - Core

Licence

Welcome to the CoCart core repository on GitHub. Here you can browse the source code, look at open issues and keep track of development. 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: https://docs.cocart.xyz

👋 Looking to contribute to CoCart?

🫶 Show some appreciation by sponsoring.

Description

Transform your WooCommerce store into a lightning-fast, decoupled shopping experience with CoCart — an open-source REST API designed to set your store free from WordPress’s limitations. Build in modern frameworks like Astro, React, Vue, or Next.js, putting full control back in your hands and making complex customizations a breeze.

Built by developers, for developers, CoCart is more than just an API extension. It’s a suite of tools that make managing a headless WooCommerce store seamless and fast—without the constraints of a traditional WordPress theme. Allowing you to focus on building a unique and seamless shopping experience.

Want to try it out?

What is WooCommerce?

WooCommerce is a free open-source eCommerce plugin that provides a flexible, and efficient way to build cutting-edge stores with WordPress at it’s core.

Why do I need CoCart?

If you are looking to create a great store for your customers that is fast and unrestricted, decoupling your store is a no-brainer. However, accessing the front side via the REST API is not designed in WooCommerce, that’s where CoCart comes in. It handles the roadblocks and eliminates the hassle of creating your own REST API endpoints and provides all the essential features for a powerful, headless eCommerce experience.

Features

  • Source of Truth - CoCart integrates with WooCommerce’s Data Stores API and includes WooCommerce hooks, making it compatible with most WooCommerce extensions right out of the box.
  • Session Control Without Cookies - CoCart uses a secure session key system, reducing server load and avoiding cookie issues for a smoother experience.
  • Easy Authentication - No need for Admin API Keys — customers can log in multiple ways with options like username+password, email+password or phone number+password.
  • Flexible Domain Control - CORS problems? No worries. CoCart lets you control origin access to prevent cross-domain issues.
  • Efficient Product Search - Search by product name, ID or SKU, filter products quickly without compromising privacy.
  • Real-Time Cart Validation - Enjoy up-to-date cart accuracy with automatic stock checks, total calculations, and fee adjustments.
  • No Headless Checkout? - Easily load any cart session into the native WooCommerce checkout (if you prefer) and auto-login customers without further user interaction.
  • Customizable Callbacks - Register your own cart callbacks without creating new endpoints. CoCart handles the rest, returning responses once complete.
  • Cart Session Tracking - Monitor all cart sessions, including expired or expiring carts, to better track customer engagement.
  • Name Your Price - Offer customers the option to pay what they want, encourage your audience and increasing conversion rates.
  • Bulk Requests - Batch multiple cart requests at once for efficiency and faster responses.

And this is just the start. With CoCart, your WooCommerce store can be faster, more flexible, and ready to take on any custom solution you dream up.

📦 Serious about going headless?

Transform your WooCommerce store into a lightning-fast, decoupled shopping experience with CoCart and unlock your store’s true potential. Upgrade to access premium features and extend CoCart’s capabilities to take your headless WooCommerce store even further.

See what else we have in store.

👍 Add-ons to further enhance CoCart

We also have add-ons that extend CoCart to enhance your development and your customers shopping experience.

They work with the core of CoCart already, and these add-ons of course come with support too.

🧰 Developer Tools

  • 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 auto-completion 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.

Need Support?

We aim to provide regular support for the CoCart plugin via our Discord community server. Please understand that we do prioritize support for our paying customers.

Core Plus
CoCart Core 'Early Access' CoCart Plus - Single Site

🐞 Bug Reporting

Bug reports for CoCart are welcomed in the CoCart repository on GitHub. Please note that GitHub is not a support forum, and that issues that aren’t properly qualified as bugs will be closed.

Support CoCart

Please consider starring ✨ and sharing 👍 the project repo! This helps the project get known and grow with the community. If you like to help further CoCart’s development, why not consider sponsoring.

Thank you! 🙏

Testimonials

An excellent plugin, which makes building a headless WooCommerce experience a breeze. Easy to use, nearly zero setup time.

Harald Schneider ⭐️⭐️⭐️⭐️⭐️

What can I say this thing has it all. It is the “Missing WooCommerce REST API plugin” without it I was managing users cart myself in weird and wonderful but hacky ways. NOT GOOD and so vulnerable. Then I stumbled upon CoCart and with the help of Seb I got it working how I needed it and he has been supporting me with even the smallest of queries. Really appreciate your work and continued support Seb.

Joel Pierre – JPPdesigns Web design & Development ⭐️⭐️⭐️⭐️⭐️

This plugin was critical to achieve my project of building a headless / decoupled WooCommerce store. I wanted to provide my clients with a CMS to manage their store, but wanted to build the front-end in React. I was able to fetch content over the WooCommerce REST API, but otherwise would not have been able to fetch the cart, and add & remove items if not for this plugin.

Thank you very much Sébastien for sharing this extension, you’ve saved me a lot of time.

Allan Pooley – Little and Big ⭐️⭐️⭐️⭐️⭐️

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 ourselves the lifetime subscription.

MightyGroup – Rikard Kling ⭐️⭐️⭐️⭐️⭐️

See the wall of love for more testimonials. We’d also love to hear what you have to say. Share your thoughts and help others discover if CoCart is for them.


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.

Get involved

Do you like the idea of creating a headless store with WooCommerce? Got questions or feedback? We’d love to hear from you. Come join our community! ❤️

CoCart also welcomes contributions. There are many ways to support the project! If you don’t know where to start, this guide might help >> How to contribute?


Credits

Website cocartapi.com  · 
GitHub @co-cart  · 
Twitter @cocartapi


CoCart is developed and maintained by Sébastien Dumont.
Founder of CoCart Headless, LLC.

Website sebastiendumont.com  · 
GitHub @seb86  · 
Twitter @sebd86