What is the difference?
Both API’s are unique for their individual purposes.
WooCommerce’s Store API is designed for the Gutenberg blocks which only requires a fixed format of data and is still prone to be used on native storefronts.
It also only works with Nonces when you are on the site, so for mobile apps or headless eCommerce, you will run into issues. Even disabling Nonces to use something like JWT won’t fully work for headless. And still relies on cookies.
CoCart’s API is designed for decoupling away from WordPress and lets you build headless eCommerce using your favorite technologies. No Nonces, no cookies.
CoCart helps by providing more data (both in the cart and products API) that can be filtered to only what you need before it is returned making the response faster.
CoCart also comes packed full of powerful features that are completely customizable making it possible for businesses to build a complete custom storefront how they want.
Comparison
Feature | CoCart | WooCommerce Store API |
---|---|---|
Basic authentication support | ✅ Also allows email as username (phone support soon) | ❌ |
CORS ready | ✅ | ❌ |
Set custom price as item is added to cart | ✅ | ❌ |
Caching disabled even with cache plugins installed | ✅ | ❌ |
Load a cart in session via the web | ✅ | ❌ |
Supports guest customers | ✅ | ❌ |
Supports multi-site network | ✅ | ✅ |
Get store information | ✅ | ❌ |
Support to logout a customer | ✅ | ❌ |
Does it support guest customers?
Yes, CoCart supports guest customers by providing them with a unique cart key either generated by CoCart after the first item is added to the cart or by manually providing one yourself.
Unlike the Store API, it is always reflective of the current user (cookie-based) which is not practical for most JavaScript frameworks as tracking the cart is not identifiable.
Have any questions?
If you have other questions, please contact us.
Get Support
Come say hello 
© CoCart All Rights Reserved. 2023