1,000+
April 21, 2026
February 26, 2018
CoCart: The BEST REST API for decoupling WooCommerce stores
CoCart is a developer-first REST API to decouple WooCommerce on the frontend. It gives you everything you need to start developing your own custom storefront. CoCart Plus plugin extension unlocks more to complete the shopping experience out the box.
Build the modern and scalable storefront of your dreams with confidence independent of WordPress using frameworks like Astro, React, Vue, or Next.js, gaining complete control over your customers experience no matter what your store sells.
CoCart was built for developers in mind. With hooks and filters available so you can extend or integrate custom functionality for your headless setup.
🚀 Core cart functionality (FREE)
* ✅ Zero learning curve – Built on WooCommerce Data Stores with familiar hooks, ensuring broad plugin compatibility.
* 🔐 Session management – Cookie-less, database-stored sessions. Handle concurrent users without breaking a sweat.
* 🛒 Essential cart operations – Add, remove, update items and calculate totals in simple API calls.
💻 Developer experience that doesn’t suck
* 🔑 Authentication that makes sense – Email, username, or phone login. No admin API keys to juggle.
* 🌍 CORS just works – First-party CORS support means your frontend connects instantly, no configuration hell.
* 🧩 Extendable Callbacks – Add your own logic without writing new API routes.
* 📦 Bulk Cart Requests – Combine multiple API calls into one for better performance.
* 📊 Cart Insights – Monitor all cart sessions, including those nearing expiration or already expired.
🎯 WooCommerce compatibility, guaranteed
* 🛠 Native checkout support – Load any cart session into WooCommerce’s checkout. Your payment gateways work seamlessly.
* 🔎 Product search – Query by name, SKU, or ID — authenticated or not — with flexible filtering.
* 💸 Name Your Price support – Donation-based pricing with built-in flexibility.
Want more? Upgrade to CoCart Plus.
First time using CoCart? Check out the documentation and create a sandbox to try it out.
★★★★★
“An excellent plugin, which makes building a headless WooCommerce experience a breeze. Easy to use, nearly zero setup time.” – Harald Schneider
★★★★★
“This plugin works great out of the box for adding products to the cart via API. The code is solid and functionality is as expected, thanks Sebastien!” – Scott Bolinger, Creator of Holler Box
★★★★★
“This plugin saved me tons of work and it is working amazingly! The plugin author provides fast and high-quality support. Well done!” – @codenroll
Additional features in CoCart Plus:
Join thousands of developers and agencies building with CoCart — the REST API that takes WooCommerce further.
👉 Upgrade to CoCart Plus and build the future of eCommerce today.
★★★★★
“Thanks for doing such 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.” – Mighty Group Agency
See our wall of love for more developer testimonials.
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.
We also have add-ons that extend CoCart to enhance your development and your customers’ shopping experience.
These add-ons of course come with support too.
On Discord, we have a community of developers, WordPress agencies, and shop owners building the fastest and best headless WooCommerce stores with CoCart.
Come and join our community
This plugin is developed and maintained by Sébastien Dumont.
Founder of CoCart Headless, LLC.
You can help translate “CoCart” into your language.
INTERESTED IN DEVELOPMENT?
Browse the code on GitHub, or follow the CoCart development blog for the latest development updates. You can also follow @cocartapi on Twitter to stay up to date about everything happening with CoCart.
Please share your experience
We’d love to hear what you have to say. Share your experience and help others discover CoCart. It helps to keep the plugin going strong, and is greatly appreciated.
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”.
The manual installation method involves downloading the plugin and uploading it to your web server via your favorite FTP application. The WordPress codex contains instructions on how to do this here.
It is recommended that anytime you want to update CoCart that you get familiar with what’s changed in the release.
CoCart publishes release notes via the changelog.
CoCart uses Semver practices. The summary of Semver versioning is as follows:
You can read more about the details of Semver at semver.org
CoCart provides a frontend API for WooCommerce, enabling headless eCommerce development. Instead of being locked into WordPress themes, you can build lightning-fast storefronts with modern frameworks like React, Vue, Next.js, or any technology you prefer.
Developers who are tired of working on slow performance WooCommerce storefronts and want the freedom to build with modern frameworks. Perfect for:
– Frontend developers building headless eCommerce stores
– Agencies creating high-performance client sites
– Mobile app developers needing eCommerce APIs
– Anyone wanting infinite customization
CoCart is designed with developers in mind allowing for complete control to customize or add support for a plugin to work with CoCart. CoCart does its best to work out of the box but if there is a compatibility issue with a plugin that you would like to work with CoCart. We would be happy to hear about it.
CoCart sources the WooCommerce’s Data Stores API and repeats most WooCommerce hooks to provide a wider array of support for most WooCommerce extensions out of the box.
Yes. Just install CoCart and activate it on the sites you want to use CoCart.
Absolutely. That is what CoCart is mainly developed for. You just need to enable CORS. You can do that easily with the CORS add-on or you can manually enable it via the filters available in the documentation.
The majority of plugins are not REST API specific so it shouldn’t. However, while we allow the source of truth for compatibility, there may be a WooCommerce extension that returns data via an action hook that the REST API cannot understand during a specific action and may fail the response.
If that does happen, simply report the situation with as much detail as possible on our GitHub repository and we will try our best to find a solution.
You will first need WooCommerce installed and set up to your configurations. Then install CoCart, activate and you’re ready to start using the REST API following the API Reference provided.
Please check the requirements listed in the installation section.
The WooCommerce REST API is primarily for store management (orders, products, coupons, etc.) and is designed for authenticated admins/apps. It isn’t built for customer cart flows.
CoCart fills this gap. It’s specifically built for frontend cart handling where you want a seamless shopping experience that mimics traditional WooCommerce behavior but via API.
It’s optimized, extendable, and built for performance in decoupled setups.
To better answer this question in detail, please read our comparison article.
CoCart itself doesn’t use cookie-based authentication — it supports Basic and JWT Authentication (via add-on), which are stateless and frontend-friendly. So when a user logs in through your headless site/app, they’re authenticated for API requests — including cart operations.
Definitely. CoCart doesn’t block or replace any part of the WP or WC APIs — it works alongside them. Once authenticated, your headless site/app can access any available endpoint, whether from CoCart, WooCommerce, or custom APIs you’ve built.
Yes, CoCart is built for developers. If you can make HTTP requests and work with JSON responses, you’re ready to use CoCart.
Skill level needed:
– Basic understanding of REST APIs
– Experience with JavaScript, React, Vue, or your preferred frontend framework
– Familiarity with HTTP requests (GET, POST, etc.)
No WordPress development experience required! CoCart abstracts away WordPress complexity, giving you clean, predictable API responses.
You can find the documentation here.
You certainly can. There are over 200+ filters available to customize to your needs.
If you’re familiar with WooCommerce, you may be wondering why using a custom session handler at all instead of the WooCommerce default session handler? A number of reasons but the ones that really matter are.
shutdown hook.No. “WooCommerce Shipping and Tax” ignores any custom REST APIs from allowing the ability to calculate the taxes from TaxJar except for WooCommerce Blocks and JetPack. We don’t recommend it. However, TaxJar for WooCommerce plugin is supported.
If you have “TaxJar for WooCommerce” v3.2.5 or above and CoCart v3.0 or above installed… then yes, it is supported.
Yes, you can use your preferred tools and favorite modern technologies like Astro, NextJS, React, Vue, Ember and more giving you endless flexibility and customization.
Report bugs on the CoCart GitHub repository. You can also notify us via the Discord community server in the #bug-report channel – be sure to search the forum to confirm that the error has not already been reported.
Yes, you can! Join in on our GitHub repository and follow the development blog to stay up-to-date with everything happening in the project.
Yes! CoCart is deployed with full translation and localization support via the ‘cart-rest-api-for-woocommerce’ text-domain.
If you get stuck, you can ask for help in the CoCart support forum or join the CoCart Community on Discord where you will find like minded developers who help each other out. If you are in need of priority support, it will be provided by purchasing CoCart Plus or a higher tier.
Find out all relevant features and pricing information over on the official site.
Check out Frequently Asked Questions for more.
📢 Only bug and security updates will be provided here on WordPress dot ORG. Major updates or new features are provided directly from us.
This is a community edition of the core of CoCart. Response time for support is slower than paying customers. Thank you for your understanding.
Plugin name change showing before and after below.
Before: Headless eCommerce API for Developers
Now: CoCart – Headless REST API for WooCommerce
sprint_f() typo in database update scheduler (sprintf).Access-Control-Allow-Credentials header correctly.cocart_load_cart_override was used.get_ip_address for better trusted proxy support and better IP address detection with additional headers.is_user_customer function to support additional user roles beyond just customers.cocart_login_permission_callback allows additional authentication checks after basic authorization for the login endpoint.cocart_login_secure_auth_methods determines which authentication methods should skip additional auth checks.cocart_login_query_parameters allows plugins to add additional parameters to the login endpoint.cocart_trusted_proxies allows adding trusted proxy IPs/CIDR for secure IP detection.cocart_ip_headers allows customization of headers used for IP address detection.cocart_login_permission_granted that triggers when login permission is granted for the login endpoint.WP_Error consistently from permission checks.username and password.update_session_timestamp() database query.persistent_cart_update compatibility for WooCommerce v10; only active for versions lower than v10.1.session_exists() and delete_session() to use CoCart’s session table.$_REQUEST to $_GET and removed the priority for load_cart_action.initialize_cart_session() and stopped destroying cookies when loading carts.cocart_load_cart_override is no longer used.WooCommerce v10 caused a cache issue due to a change in the many times session data is handled.
rest_pre_serve_request instead of CoCart_Response which is not used for Products API.Developer note: Cart cache allows for items with custom pricing to be calculated on the native site and not just via the REST API to keep consistent with calculations.
undefined array key errors with cart session when cart is empty. Solves Issue #533This release is a compatibility release for the next WooCommerce release.
This release will most likely be the last update released on the WordPress plugin directory with anything NEW added.
This release focuses on supporting such tools like ManageWP, MainWP, Blogvault etc.
Note: The session expiration’s can still be filtered back to the previous values but that would mean it would match the expiration for logged in users.
cocart_cart_expiring added parameter is_user_logged_in() to allow the expiration for logged in users to be filtered.cocart_cart_expiration added parameter is_user_logged_in() to allow the expiration for logged in users to be filtered.cocart_log_entry_name no longer used.cocart_log_entry_version no longer used.cocart_log_entry_source no longer used.cocart_setup_wizard_store_save_next_step_override no longer used.Dev note: Meaning if you have requested that the customer provides the shipping address first before shipping is calculated, then no shipping methods will return until it’s provided.
BIGINT UNSIGNED to bigint(20) unsigned.t_ before the cart key provided. This matches with WooCommerce session handler where it maybe used by 3rd party plugins or web host configurations to identify if the session is for a guest user.Dev note: This affects only new guest sessions.
cocart_get_customer_{field} after value instead of using it only when there is no value returned for a customers field. Replace {field} with the section prefix followed by the field name. e.g. billing_countryDeveloper note: This allows you to then alter values such as the billing country. See example.
add_filter( 'cocart_get_customer_billing_country', function( $value ) {
if ( WC()->countries->country_exists( $value ) ) {
return WC()->countries->get_countries()[ $value ];
}
return $value;
}, 10, 1);
cocart_get_after_customer_{field-type}_fields that allows you to change the customer fields after they returned. Replace {field-type} with either billing or shipping for the fields to alter.no-store as part of the Cache-Control header for guest users.WP_DEBUG is made sure it is defined before returning extras for developers in the store response.| Version | Download | Type |
|---|---|---|
| 4.8.4 | Download | Stable |
| 4.8.3 | Download | Stable |
| 4.8.2 | Download | Stable |
| 4.8.1 | Download | Stable |
| 4.8.0 | Download | Stable |
| 4.7.0 | Download | Stable |
| 4.6.4 | Download | Stable |
| 4.6.3 | Download | Stable |
| 4.6.2 | Download | Stable |
| 4.6.1 | Download | Stable |
| 4.6.0 | Download | Stable |
| 4.5.0 | Download | Stable |
| 4.4.0 | Download | Stable |
| Development | Download | Trunk |