CoCart – Decoupling Made Easy for WooCommerce

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. CoCart’s developer-friendly API empowers you to 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.

Want to try it out?

Why WooCommerce?

WooCommerce provides a flexible, and efficient way to build cutting-edge stores with WordPress at it’s core. If you are looking to provide a great store for your customers that is fast, decoupling your store is a no brainer, but accessing the front side via the REST API was missing which is where CoCart comes in.

Why CoCart?

Struggling with performance? Finding it hard to decouple WooCommerce from WordPress without hitting roadblocks? CoCart is here to eliminate the hassle of creating your own REST API endpoints for WooCommerce and provides all the essential features for a powerful, headless eCommerce experience.

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

★★★★★

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

?? Built for developers, by developers

CoCart was created to fill a gap in the market for a robust, developer-friendly solution for headless WooCommerce stores. With a clean, intuitive API, CoCart lets you focus on what you do best: building unique and seamless shopping experiences.

★★★★★

Amazing Plugin. I’m using it to create a react-native app with WooCommerce as back-end. This plugin is a life-saver! Daniel Loureiro

?? Serious about going headless?

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.

★★★★★

This plugin saved me tones of work and it is working amazingly! The plugin author provides fast and high quality support. Well done! @codenroll

?? 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.

?? Developer Tools

  • CoCart Beta Tester allows you to easily update to pre-release versions of CoCart for testing and development purposes.
  • CoCart VSCode extension for Visual Studio Code adds snippets and autocompletion of functions, classes and hooks.
  • CoCart Product Support Boilerplate provides a basic boilerplate for supporting a different product types 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.

?? Testimonials – Developers just love it

★★★★★

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. Mighty Group Agency

★★★★★

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

More testimonials

See the wall of love.

?? Upgrading

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:

  • MAJOR version when you make incompatible API changes.
  • MINOR version when you add functionality in a backwards compatible manner.
  • PATCH version when you make backwards compatible bug fixes.

You can read more about the details of Semver at semver.org

?? 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.

?? Join our growing community

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

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 the GitHub repository and join the party. ??

?? Bug reports

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.

More information

?? Credits

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

Contributors & Developers

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.

Screenshots

  • Get Products (API v2)
  • Get Individual Product (API v2)
  • Add Item to Cart (API v2)

Installation

Minimum Requirements

  • WordPress v5.6
  • WooCommerce v7.0
  • PHP v7.4

Recommended Requirements

  • WordPress v6.0 or higher.
  • WooCommerce v9.0 or higher.
  • PHP v8.0 or higher.

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 favorite FTP application. The WordPress codex contains instructions on how to do this here.

Upgrading

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:

  • MAJOR version when you make incompatible API changes.
  • MINOR version when you add functionality in a backwards compatible manner.
  • PATCH version when you make backwards compatible bug fixes.

You can read more about the details of Semver at semver.org

FAQ

What does CoCart do?

CoCart provides a REST API that is ready to decouple WooCommerce away from WordPress. It allows you to search products by Name, ID or SKU, filter and return product data you need without authentication, manage cart sessions for customers and avoids the hassle of needing multiple requests to verify item and coupon validity in your cart. It also efficiently checks stock, calculates totals and fees, ensuring real-time accuracy so your responses return up to date every time.

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.

Who should use CoCart?

Pretty much everyone, who wants a faster ecommerce store to improve their business. WooCommerce runs multiple requests for multiple steps. We avoid the hassle of needing multiple requests for these steps and process them all together.

CoCart is perfect for ecommerce owners and developers who want to create an ecommerce app for mobile or a custom frontend shopping experience completely using the REST API.

Are there any limitations?

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 it’s 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.

What is the source of truth?

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.

Does CoCart work for multi-site network?

Yes. Just install CoCart and activate it on the sites you want to use CoCart.

Can I have WordPress running on one domain and my headless ecommerce on another domain?

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.

Will CoCart interfere with other plugins?

The majority of plugins are not REST API specific so it shouldn’t. However, while we allow the source of truth for compatibility, there maybe 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.

How do I set up CoCart?

You will first need WooCommerce installed and set up to your configurations. Then install CoCart, activate and your ready to start using the REST API following the API Reference provided.

Please check the requirements listed in the installation section.

Why use CoCart and not WooCommerce’s Store API?

WooCommerce’s Store API is designed for the Gutenberg blocks which only requires a fixed format and is still prone to be used on native storefronts. It also lacks validation on the server end which you will need and not every extensions yet works with it out of the box. A lot of valuable information and abilities that developers require to help them are also unavailable and if you try to use the Store API for headless you will have issues managing the cart sessions.

CoCart’s API is designed for decoupling away from WordPress with ease. It’s a plug and play solution that just works out of the box. Also, improvements are always made to CoCart to ensure you get the best decoupled experience.

Do I need to have coding skills to use CoCart?

As this plugin provides a REST API built for developers, you will need to have some coding knowledge to use it.

Where can I find documentation for CoCart?

You can find the documentation here.

Can I change the formatting of values, add and change details to the responses?

You certainly can. There are over 100+ filters available to customize to your needs.

Why does CoCart use a custom session handler and table in the database?

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.

  • The default session handler only supports cookies.
  • The default session handler only saves changes at the end of the request in the shutdown hook.
  • The default session handler has no support for concurrent requests.
  • The default session handler does not support guest customers.
  • The default session handler does not store additional data that maybe required to help you.
  • The default session handler does not allow support for POS capability.
  • More consistent with modern web.

Is “WooCommerce Shipping and Tax” plugin supported?

No. “WooCommerce Shipping and Tax” ignores any custom REST API’s 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.

Is “TaxJar for WooCommerce” plugin supported?

If you have “TaxJar for WooCommerce” v3.2.5 or above and CoCart v3.0 or above installed… then yes, it is supported.

Can I use any modern stack?

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.

Can I install/update CoCart via Composer?

Yes. The best method would be to install/update CoCart from the GitHub repository but you can also do so via https://wpackagist.org/

Where can I report bugs?

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.

CoCart is awesome! Can I contribute?

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.

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 get help or talk other users about CoCart core?

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.

Where can I find out more about the additional features?

Find out all relevant features and pricing information over on the official site.

My question is not listed here. Where can I find more answers?

Check out Frequently Asked Questions for more.

Reviews

July 18, 2023
Perfect for setting up a headless woocommerce backend
June 15, 2023
Very good plugin, it helped me to connect Laravel catalog (for PageSpeed Insights, you know) & Woocommerce cart/checkout processing. Brilliant!
August 9, 2022 1 reply
An excellent plugin, which makes building a headless WooCommerce experience a breeze. Easy to use, nearly zero setup time.
August 16, 2021
since woocommerce is not offering product/cart api, this tools fits right in. you can do everything with it, all via api calls: products, variations, cart, shipping, checkout. (you might need the paid version as well. i bought them, so not sure, what comes out of the box and what features all need the extra mile. but still: worth it!) and the support is fast, too, thanks to seb. love it.
June 25, 2021
Plugin is a life saver when working turning wordpress & woocommerce into a headless cms. Support is also great and responsive to help with any issues you may have
Read all 21 reviews

Contributors & Developers

“CoCart – Decoupling Made Easy for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

v4.3.14 – 21st November, 2024

Bug Fixes

  • REST API: Deleting an item would not remove said item 100% due to a load conflict when authenticating.
  • REST API: Product not able to validate if item was already removed.

Dev note: The conflict is not triggered only on DELETE request methods.

v4.3.13 – 21st November, 2024

Security Patch

It appears that the rules of hidden and private meta is not respected and is still exposed on products that have such meta. This security patch ignores any meta data that is still leaking publicly without authorization.

Wait what happened to v4.3.12?

A commit error was spotted shortly after just releasing it and was taken down immediately.

Improvement

  • REST API: Last-Modified header now returns the actual date modified of the product if a product ID is detected.

v4.3.11 – 20th November, 2024

Bug Fix

  • REST API: Removed conflicting cache headers being sent.

Improvements

  • REST API: Cache patterns are more familiar and consistent with most regex usage in PHP, making it preferable for readability and maintainability.
  • REST API: Cache headers are set at a later priority fixing potential issues with some cache plugins and preflight.
  • REST API: Cache control determines if route is authenticated or not.
  • REST API: Last-Modified header now uses timezone set in WordPress general settings. Falls back to the offset if not.

Compatibility

  • Tested with WordPress v6.7
  • Tested with WooCommerce v9.4

v4.3.10 – 14th November 2024

?? Hot Fix

  • REST API: Typo caused fatal for Products API (v2 ONLY).

v4.3.9 – 14th November 2024

Security Patch

Just a note: The security issue isn’t directly related to CoCart itself, but we’re here to help keep your store secure. Since CoCart is a public API, security patches will be released as soon as possible to prevent the issue from affecting your site, so you don’t have to wait for a fix from the plugin causing it.
We recommend updating to this version if you’re using any WooCommerce plugins that might reveal public information.
We want you to know that we would never publicly name a plugin with a security concern. However, if you notice any security issues with CoCart or another plugin connected to it, please report the security vulnerability so we can address it quickly.
Thank you for helping us keep CoCart safe for everyone!

v4.3.8 – 7th November 2024

?? Bug Fix

Developer note: A commit was missing causing a fatal error when adding items to the cart.

Changes

  • REST API: Cart item prices correctly display based on tax options for the cart not the store.

v4.3.7 – 5th November, 2024

Bug Fixes

  • REST API: Fixed rounding issue due to decimal separator being different with the cart total for some odd reason with WooCommerce.
  • REST API: Fixed accessing correct schema for viewing a single session.
  • Plugin: Properly deprecated is_rest_api_request() function within the authentication class.

Changes

  • WordPress Dashboard: Updated Setup Wizard Ready Step verbiage.
  • WordPress Dashboard: Bumped upgrade notice from showing after 4 weeks newly installed to 6 weeks.
  • WordPress Dashboard: No longer call Gravatar.
  • Plugin: Translation URL has changed to https://translate.cocartapi.com

Improvements

  • REST API: Moved some cart validation further up before returning cart contents.
  • REST API: Reset the item key when adding item again as it may have been manipulated by adding cart item data via code or plugin.
  • REST API: Only update cart item quantity if quantity is different when requested.
  • REST API: Check cached price against price with tax mode not just the product price set.
  • WordPress Dashboard: Adjusted notices to get cached for the current site should it be a multisite.
  • WordPress Dashboard: No longer reset upgrade notice each time CoCart updates.
  • Plugin: PHPStan used to help with correcting errors and inconsistencies.

v4.3.6 – 23rd August, 2024

Bug Fixes

  • REST API: View or deleting a session with the Sessions API was not accessing the session handler. No longer needs a separate load.
  • Session Handler: Fixed merging of cart from guest.

v4.3.5 – 9th August, 2024

Bug Fix

  • REST API: Changed priority for sending headers from 0 to 1 to help with CORS.

v4.3.4 – 3rd August, 2024

Bug Fix

  • REST API: Fixed an issue with CORS not returning header access-control-allow-origin.

v4.3.3 – 24th July, 2024

Corrections

  • Autoload for classes in the backend corrected to new locations.
  • Clean up task that is scheduled was looking for the session handler in the wrong place.
  • Fixed update_session_timestamp() function from failing in session handler.

Improvements

  • REST API: Price of product is now consistent in the Cart API (v2 ONLY). If your store was setup with no decimals the price would not return fully. Solves issue #429
  • REST API: Value of weight was returning in the wrong format. By returning as a string you get the true value without needing to round it up yourself.
  • WordPress Dashboard: Updated add-on update watcher.

v4.3.2 – 19th July, 2024

?? Hot Fix

This release fixes 3 known issues that were reported. issue #425, issue #426, issue #427 that has been affected since version 4.2 of CoCart.

It was due to the optimizations made to allow CoCart to perform better. Unfortunately it had some unexpected side affects that were not picked up during testing. For that I am sorry. If you haven’t rolled back to before 4.2 then this patch is highly recommended.

Previous patch releases will also be updated to prevent further sites from experiencing these issues for those who like to update to specific version of the plugin.

A hard lesson was learned here and hope you haven’t lost trust in the plugin. I appreciate your feedback and support during this process.

Please don’t forget to backup your site before updating.

Corrections

  • Plugin: Typo caused the WP-CLI commands to not register and crash when used with composer.
  • REST API: The data exception class was oddly not loading when updating an item. Autoloader was not picking it up. Now it is required.
  • REST API: Cart would empty but the subtotal would not reset.

Improvements

  • REST API: Ensure we have calculated totals before we get an item or update an item so we can identify them.

v4.3.0 – 17th July, 2024

What’s New?

In this release we have added a plugin update prevention system as a safety measure. For the moment it will detect for compatibility with minor releases while we are making adjustments but it’s designed mostly for detecting major changes. All CoCart add-ons that we release will now check for CoCart’s requirements and will help you decide to update or not until your ready to do so.

  • Plugin: Added plugin headers to be used for detecting CoCart add-ons or plugins that support CoCart.
  • WordPress Dashboard: Auto-updates are disabled should a CoCart add-on active have not tested with the latest release available.
  • WordPress Dashboard: Update now link for CoCart opens up a modal listing none tested plugins with a confirmation.

Improvements

  • REST API: Ensure we have calculated totals before we restore the requested item so we can identify them.

For Developers

These filters are for site admins more than anything.

  • Introduced filter cocart_in_plugin_update_message allows you to change the upgrade notice.
  • Introduced filter cocart_get_plugins_with_header allows you to get the plugins that have a valid value for a specific header.
  • Introduced filter cocart_get_plugins_for_cocart allows you to get plugins which “maybe” are for CoCart.

Compatibility

  • Tested with WordPress v6.6
  • Tested with WooCommerce v9.1

v4.2.2 – 12th July, 2024

Reverting

We are reverting a change for destroying a session. Previous change causes a conflict with identifying the correct column with our session table and causes the cart not to clear.

v4.2.1 – 11th July, 2024

Hot Fix

When loading a cart from session a deprecated function was still triggered. It’s now been removed to prevent failing.

v4.2.0 – 11th July, 2024

In this release we have optimized our session handler making this release more compatibility with third party plugins. We also no longer use cookies as a backup for headless. This should also help with the confusion of needing to pass along the session cookie or reading the cookie to extract the cart key and help with user switching much better. A cart key is provided in both the cart response and returned headers. Saving the cart key in your own cookie or local storage is fairly straight forward.

We advise that you update on staging or local to check if you have used any of our experimental functions and filters that were added to the session handler to see if any have been deprecated. You can also see the list of deprecations below. If you have any questions about this update please contact us.

What’s New?

  • REST API: Can now request a guest cart via a requested header cocart-api-cart-key.

Improvements

  • Session Handler: Improved identifying cart without the need of cookies.
  • Session Handler: Added new function is_user_customer() to check the user role is a customer when authenticated before migrating cart from guest.
  • Authentication: Validation for invalid details was taking too long and failed to return an error message.
  • REST API: Updating the customer details in cart will now take additional billing and shipping fields as meta data. Validation is required by the developer using filter cocart_update_customer_fields.
  • REST API: Sanitized and formatted customer email address and phone number.
  • REST API: Formatted customer postcode if validated.
  • REST API: Product image sizes are now fetched using utility products class function get_product_image_sizes(). Cuts down on the filter cocart_products_image_sizes being in multiple places.
  • REST API: Currency in cart API v2 now returns currency_symbol_pos and the currency symbol will now return based on the set currency without lookup.
  • REST API: Improved headers returned and added nocache headers on authenticated requests.
  • REST API: Simplified returning the cart key to the headers.
  • REST API: Loading of the REST API optimized.
  • Plugin: Moved is_rest_api_request() function to the main class so it can be utilized outside of the plugin.
  • Plugin: Localization improvements.
  • Plugin: Updated plugin review notice.
  • Plugin: Code files organized better.

Deprecations

  • Removed the need to support web host “Pantheon” by filtering the cookie name.
  • Removed our session abstract CoCart_Session that extended WC_Session. Any remaining functions have moved to our refreshed session handler.
  • Function CoCart_Session_Handler::destroy_cookie() no longer used.
  • Function CoCart_Session_Handler::cocart_setcookie() no longer used.
  • Function CoCart_Session_Handler::get_cart() no longer used.
  • Filter cocart_cookie no longer used. Use woocommerce_cookie instead.
  • Filter cocart_cookie_httponly no longer used.
  • Filter cocart_cookie_supported no longer used.
  • Filter cocart_set_cookie_options no longer used.
  • Filter cocart_cart_use_secure_cookie no longer used. Use wc_session_use_secure_cookie instead.
  • Filter cocart_is_cart_data_valid no longer used.
  • Returned headers X-CoCart-API-Timestamp and X-CoCart-API-Version no longer used.

Developers

  • Introduced new action hook cocart_after_session_saved_data fires after the session is saved.
  • Introduced new filter cocart_send_nocache_headers to decide if nocache headers are sent.
  • Some functions from the cart and products API v2 have been moved to there own utility class so they can be utilized outside of the plugin.
  • Added utility function to check for coupon exists.
  • Moved two functions from CoCart Plus to be utilized outside of the plugin.

Compatibility

  • Tested with WordPress v6.6
  • Tested with WooCommerce v9.0

v4.1.1 – 14th June, 2024

Bug Fix

  • Uncaught error with no featured image for a variation of a variable product. Solves issue 416

v4.1.0 – 6th June, 2024

In this release we are adding some quality of life improvements.

What’s New?

  • REST API: Added new cart callback that allows you to set the customers billing details. See guide on how to use.
  • REST API: Basic Authentication now accepts a customers billing phone number as their username. Password is still required when authenticating.
  • REST API: Added the ability to set the customers billing phone number while adding item/s to cart.

Improvements

  • Plugin: Added more inline documentation for action hooks and filters.
  • Plugin: Should the session not be initialized when called, it now fails safely.
  • REST API: Authentication now detectable by authorization headers HTTP_AUTHORIZATION, REDIRECT_HTTP_AUTHORIZATION or getallheaders() function.
  • REST API: Re-calculating cart totals has moved to the abstract cart callback so it can be shared.
  • REST API: Setting a custom price for an item will now return that price for the item not just update the subtotals and totals.
  • REST API: When adding an item to cart with a custom price, checks if the product allows it to change. Set via filter cocart_does_product_allow_price_change.
  • REST API: Stock details now return for variations in the Products API (V2 Only). Schema updated to match.
  • REST API: Added headers CoCart-API-Cart-Expiring and CoCart-API-Cart-Expiration to be exposed with CORS.
  • REST API: Browser cache has been improved.

Bug Fixes

  • REST API: Most product endpoints for API v2 where suddenly not registering since v4.0.

Deprecations

  • Removed the legacy API that CoCart started with.
  • Removed support for stores running lower than WooCommerce version 4.5
  • User switching removed. Never worked 100%. Mainly added for internal debugging purposes.
  • No longer use cocart_override_cart_item filter. Recommend using cocart_item_added_to_cart action hook instead.
  • No longer user cocart_cart_updated hook. Replaced with cocart_update_cart_before_totals hook.

Developers

  • Introduced new filter cocart_auth_header that allows you to change the authorization header.
  • Introduced new filter cocart_set_customer_id that allows you to set the customer ID before initialized.
  • Introduced new filter cocart_available_shipping_packages that allows you to alter the shipping packages returned.
  • Introduced new filter cocart_does_product_allow_price_change that allows you to deny all custom prices or on specific items.
  • Introduced new filter cocart_update_customer_fields that allows for additional customer fields to be validated and added if supported.
  • Introduced new action hook cocart_after_item_added_to_cart that allows for additional requested data to be processed once item has added to the cart.
  • Introduced new action hook cocart_after_items_added_to_cart that allows for additional requested data to be processed once items are added to the cart.
  • Introduced new action hook cocart_update_cart_before_totals fires before the cart has updated via a callback.
  • Introduced new action hook cocart_update_cart_after_totals fires after the cart has updated via a callback.

  • Added the request object and the cart object as parameters for filter cocart_cart. No longer use $from_session parameter.

Compatibility

  • Tested with WooCommerce v8.9

v4.0.2 – 17th May, 2024

Bug Fixes

  • REST API: Reverted a change that broke the ability to clear the cart. Was falsely notify it cleared when it did not.
  • WordPress Dashboard: WooCommerce System Status was not echoing CoCart tips correctly.

Improvements

  • REST API: Products API, Schema, added properties for reviews section in both API v1 and API v2.

v4.0.1 – 15th May, 2024

Bug Fix

  • REST API: Class ReserveStock not found when adding products to cart.

Developer note: A line was unintentionally removed that calls the class for use.

v4.0.0 – 13th May, 2024

In this release, we are happy to provide some of the various improvements made through out the plugin that were from the originally planned v4 release. These improvements are backwards compatible but one change is not. See the developer note for details.

Developer note: This release requires the quantity parameter to pass the value as a string for both adding items or updating items. If you are not new to CoCart then please update your code to account for this change.

Find out more about what’s new in CoCart 4.0 in our release post!

Hope you enjoy this release.

What’s New?

  • REST API: Added batch support for cart endpoints listed below. (API v2 supported ONLY) See article for batch usage.
      • Add item/s to cart.
      • Clear cart.
      • Remove item.
      • Restore item.
      • Update item.
      • Update cart.

Bug Fixes

  • Plugin: Fixed various text localization issues.
  • REST API: Access-Control-Allow-Credentials being outputted as 1 instead of true. Solves issue 410. Thanks to @SebastianLamprecht for reporting it.
  • REST API: Update cart requests no longer fails and continues to the next item if an item in cart no longer exists.
  • REST API: Products API schema has been completed for v1.
  • REST API: Products API schema has been corrected for v2.
  • WordPress Dashboard: Plugin suggestions now lists CoCart JWT Authentication add-on.

Improvements

  • REST API: Now checks if the request is a preflight request.
  • REST API: Error responses are now softer to prevent fatal networking when a request fails.
  • REST API: Callback for cart update now passes the cart controller class so we don’t have to call it a new.
  • REST API: Cart schema tweaks.
  • REST API: Cart and Product schema are now cached for performance.
  • Plugin: Added more inline documentation for action hooks and filters.
  • Plugin: Improved database queries.
  • Plugin: Updated to latest WordPress Code Standards.
  • WordPress Dashboard: Added CoCart add-on auto updates watcher.
  • WP-CLI: Updating CoCart via command will now remove update database notice.

Developers

  • REST API: Two new headers return for cart responses only. CoCart-API-Cart-Expiring and CoCart-API-Cart-Expiration.

These two new headers can help developers use the timestamps of the cart in session for when it is going to expire and how long until it does expire completely.

  • REST API: Error tracking is returned with the error responses when WP_DEBUG is set to true to help with any debugging.
  • REST API: Class aliases have been added to API v2 controllers after changing the class names for consistency.

Compatibility

  • Tested with WooCommerce v8.8

v3.12.0 – 18th March, 2024

Security Patch

?? This release solves a validation issue for both versions of the Products API when accessing an individual product. It is important that you update to this release asap to keep your store secure.

Bug Fixes

  • Corrected: Products API v1 Schema for weight object.
  • Added: Missing Products API v1 Schema for Image sizes.
  • Fixed: Schema product type options to match with parameters.
  • Fixed: Products API returning custom attributes with special characters incorrectly. Solves issue 401
  • Fixed: Some requested data was not sanitized.

Compatibility

  • Tested with WordPress v6.5

View the full changelog here.

VIP777 login Philippines Ok2bet PRIZEPH online casino Mnl168 legit PHMAYA casino Login Register Jilimacao review Jl777 slot login 90jili 38 1xBet promo code Jili22 NEW com register Agila Club casino Ubet95 WINJILI ph login WINJILI login register Super jili168 login Panalo meaning VIP JILI login registration AGG777 login app 777 10 jili casino Jili168 register Philippines APALDO Casino link Weekph 50JILI APP Jilievo xyz PH365 casino app 18JL login password Galaxy88casino com login superph.com casino 49jili login register 58jili JOYJILI apk Jili365 asia ORION88 LOGIN We1win withdrawal FF777 casino login Register Jiligo88 philippines 7777pub login register Mwgooddomain login SLOTSGO login Philippines Jili188 App Login Jili slot 777 Jili88ph net Login JILIMACAO link Download Gcash jili login GG777 download Plot777 app download VIPPH register Peso63 jili 365.vip login Ttjl casino link download Super Jili 4 FC178 casino - 777 slot games JILIMACAO Philippines S888 register voslot LOVE jili777 DOWNLOAD FK777 Jili188 app CG777 app 188 jili register 5JILI login App Download Pkjili login Phdream Svip slot Abcjili6 App Fk777 vip download Jili888 register 49jili VIPPH register Phmacao co super Taya777 link Pogo88 real money Top777 app VIP777 slot login PHMACAO 777 login APALDO Casino link Phjili login Yaman88 promo code ME777 slot One sabong 888 login password PHMAYA casino Login Register tg777 customer service 24/7 Pogibet slot Taya777 org login register 1xBet live Acegame888 OKBet registration JILIASIA Promotion Nice88 voucher code AgilaClub Gaming Mnl168 link Ubet95 free 50 PHMAYA casino login JLBET 08 Pb777 download 59superph Nice88 bet sign up bonus Jiliyes SG777 download apk bet88.ph login JILIPARK casino login Register Philippines PHMAYA APK CC6 casino login register mobile PHMACAO com download MWPLAY app JILIPARK Download Jili999 register link download Mnl646 login Labet8888 download 30jili jilievo.com login Jollibee777 open now LOVEJILI 11 18JL casino login register Philippines JILIKO register Philippines login Jililuck 22 WJPESO casino PHMAYA casino login Jili777 login register Philippines Ttjl casino link download W888 login Register Galaxy88casino com login OKBet legit tg777 customer service 24/7 Register ROYAL888 Plot777 login Philippines BigWin Casino real money PHLOVE 18JL PH 18JL casino login register Philippines SG777 Pro Taya777 pilipinong sariling casino Jiligames app MNL168 free bonus YesJili Casino Login 100 Jili casino no deposit bonus FC178 casino free 100 Mwcbet Download Jili888 login Gcash jili download JILIMACAO 123 Royal888 vip 107 Nice888 casino login Register FB777 link VIPPH app download PHJOIN 25 Ubet95 legit phcash.vip log in Rrrbet Jilino1 games member deposit category S888 live login FF777 download FC777 VIP APK ME777 slot Peso 63 online casino OKGames app Joyjili customer service superph.com casino FB777 Pro Rbet456 PH cash online casino Okbet Legit login taruhan77 11 VIPPH 777Taya win app Gogo jili 777 Plot777 login register Bet99 app download Jili8989 NN777 VIP JP7 fuel Wjevo777 download Jilibet donnalyn login Register Bossjili ph download 58jili login registration YE7 login register FC777 new link login 63win register Crown89 JILI no 1 app Jili365 asia JLBET Casino 77PH fun Jili777 download APK Jili8 com log in CC6 casino login register mobile ph365.com promotion phjoin.com login register 77PH VIP Login download Phdream live chat Jlslot2 Me777 download Xojili legit PLDT 777 casino login Super Jili Ace Phdream 44 login Win888 casino JP7 Bp17 casino login TTJL Casino register FB777 slot casino Jili games online real money phjoin.com login register BET99 careers ORION88 LOGIN Plot777 login Philippines Labet8888 login JILI Official Pogibet app download PH777 casino register LOVEJILI app Phvip casino VIP jili casino login PHMACAO app 777pnl legit YE7 casino online Okbet download CC6 bet app 63win club Osm Jili GCash LOVEJILI 11 Www jililive com log in Jili58 casino SuperAce88 JiliLuck Login Acegame 999 777pnl promo code MWPLAY good domain login Philippines Pogo88 app Bet casino login Superph98 18jl app download BET999 App EZJILI gg 50JILI VIP login registration Jilino1 new site pogibet.com casino Jili Games try out Gogojili legit 1xBet Aviator WINJILI ph login Jili168 register How to play Jili in GCash 777pnl PHDream register login JILISM slot casino apk FB777 c0m login EZJILI Telegram MWCASH88 APP download Jili88 vip03 APaldo download 1xBet 58JL Casino 58jl login register Jili scatter gcash OKJL slot jili22.net register login 10phginto APaldo 888 app download 1xBet live FC178 Voucher Code 58jl Jili888 ph Login 365 Jili casino login no deposit bonus JP7 VIP login PHBET Login registration 58jili login registration VVJL online Casino Club app download Jili77 login register Jili88 ph com download KKJILI casino WJ peso app Slot VIP777 BigWin69 app Download Nice88 bet Suhagame philippines Jiliapp Login register Qqjili5 Gogo jili helens ABJILI Casino OKJL download 1xBet login mobile Pogibet 888 777 game Okgames casino login Acegame888 Bet86 promotion Winph99 com m home login JP7 VIP login 20phginto VIPPH register KKJILI casino OKJILI casino Plot777 app download NN777 register bossphl Li789 login Jiligo88 app Mwcbet Download Betjilivip Https www BETSO88 ph 30jili Https www BETSO88 ph Jilievo Club Jili888 register Jili777 download APK JILI77 app download New member register free 100 in GCash 2024 Royal888casino net vip JOLIBET withdrawal MW play casino Jili365 login FB777 Pro Gold JILI Bet99 registration 55BMW red envelope Bet199 login philippines JILI188 casino login register download Phjoin legit or not Bigwin 777 Bigwin pro Apaldo PH pinasgame JILIPARK Login registration JiliApp ph04 Ph143 Jili168 login app Philippines MW Play online casino APK 77tbet register 8k8t Bigwin casino YE7 Download App Ph365 download apk Acejili Ph888 login S888 juan login 63win withdrawal Okbet cc labet 8888.com login password Mwbet188 com login register Philippines MNL168 net login registration kkjili.com download Jili888 Login registration Abc Jili com Download JILIPARK casino login Register Download AbcJili customer service live777. casino Jilievo casino jilievo APP live casino slots jilievo vip Jolibet legit PH888 login Register 888php register 55BMW win Mwbet188 com login register Philippines AbcJili customer service Jili88 ph com app 200Jili App MAXJILI casino ROYAL888 deposit mi777 Jili games free 100 ACEGAME Login Register Jilibet donnalyn login Voslot register Jilino1 live casino 18jl login app apk JILI Vip777 login Phtaya login Super Ace casino login Bigwin 777 Ubet95 free 190 superph.com casino Jili22 NEW com register SG777 win Wjpeso Logo 1xBet login mobile Jili88 casino login register Philippines sign up Okbet cc Agg777 slot login Phv888 login P88jili download jiliapp.com- 777 club Fish game online real money One sabong 888 login password QQJili Taya365 slot mnl168.net login Taya365 download Yes Jili Casino PHMACAO APK free download 365 casino login Bigwin 29 JILISM slot casino apk Wow88 jili777.com ph 888php login 49jili VIP Jilino1 legit SG777 slot Fish game online real money Voslot free 100 18jl login app apk OKJL app Jili22 NEW com register Nice88 free 120 register no deposit bonus Sugal777 app download 288jili PHJOIN VIP com Register Jl77 Casino login KKjili com login Lovejili philippines Pogo88 casino SLOTSGO VIP login password Jili22 net register login password Winph 8 we1win 100 Jili slot 777pnl promo code Sg77701 Bet88 download for Android PH365 casino Royal Club login Jili88 casino login register MWPLAY login register Jilibay Promotion 7SJILI com Register FC777 casino link download Royal meaning in relationship OKBET88 AbcJili customer service 777ph VIP BOSS JILI login Register 200Jili App KKJILI casino login register maxjili Mwcbet legit JILIASIA 50 login Milyon88 com casino login 8k8app17 Royal slot Login Phmacao rest 338 SLOTSGO Ph888 login PHGINTO com login YY777 app Phdream register Jili22 net register login password Lucky Win888 Jiligames API Agila club VIP 77PH VIP Login download Acegame888 register PHMAYA Download Jili88 online casino 7XM Lovejili philippines 63win register Jilimax VOSLOT 777 login 18JL Casino Login Register JILIASIA 50 login 50JILI VIP login registration 7XM com PH Nice888 casino login Register 58jl Jili168 casino login register download Timeph philippines 90jilievo Jili88 casino login register OKBet legit JILI slot game download Bet99 promo code 58jili app 55BMW com PH login password KKjili casino login bet999 How to play Jili in GCash BigWin69 app Download OKJL Milyon88 com casino login phdream 888php register Ph888 PH777 registration bonus JLBET Asia LOVEJILI download Royal Casino login 646 ph login Labet8888 review JLBET Casino Jili888 ph Login Wjpeso Wins JILIMACAO 666 Jiliplay login register JILIAPP com login Download JiliLuck download WIN888 PH JL777 app Voslot777 legit Pkjili login 20jili casino Jolibet login registration Phjoin legit or not Milyon88 com casino register JILI apps download 88jili login register Jili 365 Login register download 11phginto Jili777 vip login Ta777 casino online Swertegames Taya365 download 777PNL online Casino login Mi777 join panalo 123 JILI slot 18jili link Panalo lyrics Jiliplay login philippines yaman88 Bet88 login Jili888 Login registration FF777 TV Ok2bet app Pogibet casino philippines Www jilino1 club WOW JILI secret code AB JILI Jili168 online casino BET99 careers Go88 slot login JILI Vip777 login CG777 Casino link OKBet GCash www.50 jili.com login WINJILI download Lucky bet99 Acegame888 77ph com Login password ACEGAME Login Register ACEGAME casino Swerte88 login password Wj slots casino APALDO Casino Phjoin slot JLBET com JLBET ph Taya777 org login 49jili slot Svip slot Jili77 download APK 200jiliclub Bet199 philippines Jili888 Login registration 88jili withdrawal phjoin.com login register Swerte88 login registration Voslot777 legit Superph11 AAA JILI app download Www jililive com log in VIP777 Casino login download Jili77 download APK Jilibet donnalyn login Register JILICC sign up Pogibet app download www.mwplay888.com download apk Jili68 Jililuck App Download APK Yy777 apk mod Jili77 vipph.com login labet8888.com app Phdream live chat Ph646 login register mobile 7777pub download Jolibet Fortune Tree 90JILI app 18JL login Philippines JLSLOT login password 50JILI fun m.nn777 login 88jili withdrawal PH Cash Casino APK 888PHP Casino LINK Boss jili app download Jili999 login register FB777 download APK Free 100 promotion JILIPARK Download VIP PH casino JILIHOT ALLIN88 login 8K8 com login PHMAYA casino login 58jili withdrawal Ubet95 free 100 no deposit bonus KKJILI online casino M GG777 100jili APP JILI888 slot download PHBET88 Jili Games demo 1xBet OKJL Casino Login Nice888 casino login Register Betso88 App download APK VIP777 app Gcash jili register 1xBet registration 58jili withdrawal Jili63 Suhagame23 218 SLOTSGO AGG777 login Philippines Bay888 login JILIVIP 83444 PHCASH com casino login Jilievo 666 Jili 365 VIP register PHMAYA link PH cash VIP login register Yaman88 casino JP7 VIP We1Win download free rbet.win apk Jili168 casino login register download Milyon88 com casino register 18JL login app 88jili withdrawal AAA Casino jilibet.com register Winjili55 UG777 login app PH777 download Jili365 bet login app Osm Jili GCash 77tbet philippines GI Casino login philippines 88jili login FC178 casino free 100 SG777 Com Login registration Nice88 free 100 Oxjili Royal777 Top777 login FB777 live 200jili login Gogojili legit Yes Jili com login phcash.vip casino Sugal777 app download 58JL app Login Panalo login JILI games APK Lucky99 Slot login Jili scatter gcash 7XM APP download FB JILI casino login download PHMACAO app ROYAL888 Link Alternatif ACEPH Casino - Link 55bmw.com casino Timeph app Osm Jili GCash M GG777 Ubet95 login Jiligo88 CG777 Casino Philippines Tayabet login Boss jili app download YY777 app download Nice88 free 120 register no deposit bonus Bossjili7 XOJILI login 68 PHCASH login ezjili.com download apk Jili 365 VIP APK Milyon88 pro Jili88 casino login register download Jili online casino AgilaPlay Jili scatter gcash 7777pub login CC6 app bonus JK4 online PHJOIN casino Joyjili login register 22phmaya 5JILI Casino login register Betso88 VIP Winph 8 Phmacao rest JILI Slot game download free s888.live legit APALDO Casino link Plot 777 casino login register Philippines Ph646wincom Jili168 login app Philippines KKJILI casino Apaldo PH Phdream live chat Slot VIP777 PH888BET 22 phginto 50JILI APP MWPLAY login register Slotph We1Win apk VIP777 slot login Nice88 PRIZEPH online casino Jilipark App 7XM app for Android Jili58 Jili168 free 100 APALDO 888 CASINO login APaldo download Jiliasia8 com slot game phcash.vip casino OKJL Casino Login YY777 live Jili888 register Winjiliph QQ jili casino login registration Abcjili5 NN777 register Phvip casino Taya 365 casino login OKBet app Osm Jili GCash Nice88 free 100 5JILI Casino login register Bet88 app download 5 55bmw vip Jlph11 JILI slot casino login Nice88 bet sign up bonus JILI Slot game download for Android Abc Jili com Download FF777 TV Peso 63 online casino MILYON88 register free 100 7777pub JILIASIA 50 login CC6 online casino latest version Royal Club apk 1xBet login registration CG777 Casino Philippines 1xBet app Mwcbet net login Password LOVEJILI 21 FBJILI Now use Joyjili Promo code JILI188 casino login register download PHMACAO SuperPH login AGG777 login app Peso 63 online casino filiplay Sugal777 app download Galaxy88casino com login EZJILI Telegram JiliApp ph04 Jilino1 com you can now claim your free 88 PHP download 63win Coupon Code PHDream 8 login register Philippines MNL168 website CC6 online casino register login 3jl app download apk Jlph7 TA777 com Login Register password 5jili11 FF777 casino login Register KKJILI casino login register 10 JILI slot game 3JL login app Jili100 APP Winjili55 Milyon88 info Jilino1 VIP login YE7 bet sign up bonus Apaldo games Wj casino app AbcJili win.ph log in Jili22 VIP 204 SG777 Jl77 Casino login YY777 app download Jilimacao Okjl space Wjevo777 download Ubet95 free 100 no deposit bonus PHMAYA APK Xojili legit 77PH bet login Taya365 pilipinong sariling casino LOVEJILI AAAJILI Casino link Jollibee777 How to play mwplay888 18jl app download jilievo.com login password VIP PH casino mnl168.net login JiliLuck download Win2max casino 777PNL download app Ubet Casino Philippines Win888 Login Jili88 casino login register Philippines sign up Bet99 APK 18JL casino Login register Download Naga888 login JLPH login PHMACAO APK free download How to register Milyon88 Royal888ph com login JiliCC entertainment WINJILI customer service PHBET88 Jili888 Login Philippines SG777 slot FBJILI Jili365 bet login app Ubet95 free 100 no deposit bonus Taya 365 casino login LOVEJILI Jili777 free 150 YE7 casino login register download QQJili 58jili login Download S888 sabong Gi77 casino Login taya777 customer service philippines number 24/7 WINJILI customer service Https www wjevo com promocenter promotioncode Nice99 casino login Phdream 44 login Mi777app 777PNL online Casino login phjl.com casino JILILUCK promo code Pogibet 888 login BigWin Casino legit Jolibet app download Jilli pogibet.com casino JP7 VIP login Ug7772 Phjoy JILIMACAO 123 PH143 online casino jili365.bet download PH cash VIP login register Abc Jili Register Mwgooddomain login 58JL Casino link 365 Jili casino login no deposit bonus JILIEVO Casino 777 60win OKGames casino 49jili VIP kkjili.com app JILIPARK casino login Register Philippines Agila Club casino OKGames GCash OKBet casino online S888 juan login Yaman88 log in Winph99 com m home login Jili88 casino login register Winjiliph CG777 Casino LOGIN Register Ubet Casino Philippines Agilaclub review Is 49jili legit ph646 JLBET link JiliCC entertainment Jilicity withdrawal Ta777 casino online Jili777 login register Philippines JP7 coupon code Milyon88 one Ug7772 Jilibet casino 77PH VIP Login download Jili live login 68 PHCASH 7XM APP download Boss jili login MWCASH88 APP download Jilicity login Acegame888 real money LIKE777 JILILUCK app JiliBay Telegram Bet199 login philippines Ph646wincom PHJOIN login OKGames register JILIASIA withdrawal Panalo login 88jili Login Philippines Wjevo777 download phjl.com casino Fcc777 login Labet8888 login JILI8998 casino login PHJL Login password Jilibay Voucher Code 28k8 Casino P88jili download 49jili apps download Fk777city we1win CG777 Casino login no deposit bonus MW play casino FF777 casino login Register Philippines download JILIAPP com login Download Bet199 PHGINTO com login Bet88 bonus Sw888 withdrawal Vvjl666 Jiliapp 777 Login QQ jili login Jilicity download Jili188 login Philippines Timeph philippines Casino Club app download Nice88 bet login registration Bay888 login PH Cash casino download Jiliko777 Nice88 PH 777pnl Jiliplay login register JILI VIP casino cg777 mwcbets.com login Fbjili2 JILIAPP download 7xm login 77jl.com login JILI Slot game download for Android MWPLAY app superph.com casino Nice88 free 120 WJ peso app Jili58 register 3jl app download apk Betso88 link OKGames login free JILIASIA 888 login 58jl login register Jilibet888 68 PHCASH login Jili88ph net register 55BMW Casino app download APK Abc Jili com Download FB777 register login Philippines Jilievo org m home JiliLuck download jlbet.com login register Jp7 casino login 18JL Casino Login Register YE7 casino APK prizeph Boss jili login Royal logo FC178 casino - 777 slot games Taya777 pilipinong sariling casino Ph888 MWPLAY app @Plot777_casino CG777 login BOSS JILI login Register JILI PH646 login Vvjlstore Mi777 casino login Download Okgames redeem code 50JILI VIP login registration Bet88 login AGG777 login Philippines JILIMACAO Yesjili com legit P88jili com login OKBET88 Gold JILI VIP PH casino VIP PH log in bet88.ph legit kkjili.com app JiliLuck Login JILI Vip777 login 63win withdrawal bet999.ph login m.nn777 login 58JL 8k8app17