CoCart v2.0.0-beta.1

CoCart v2 is now ready and available for testing.

It’s now more powerful for developers to take full advantage of the REST API to add items and manage the cart.

Not only that, the API is now faster as it is separated from WooCommerce’s REST API and runs it’s own namespace with better returned responses to reduce API requests, more item data and getting a specific customers cart.

CoCart v2 is also backwards compatible so you can still use the current API available but unless you upgrade to the new API you will miss out on the new supported features.

FYI

It’s also recommended that you are using WooCommerce v3.6 or above for CoCart v2 to function properly.

Here is a comparison of the API routes.

Current API

  • wc/v2/cart
  • wc/v2/cart/add
  • wc/v2/cart/calculate
  • wc/v2/cart/cart-item
  • wc/v2/cart/clear
  • wc/v2/cart/count-items
  • wc/v2/cart/totals

New API

  • cocart/v1/get-cart
  • cocart/v1/add-item
  • cocart/v1/calculate
  • cocart/v1/clear
  • cocart/v1/count-items
  • cocart/v1/item
  • cocart/v1/totals

The new API still uses the same properties the only difference for some of them is the endpoint is renamed.

Before v2 is made available to the public I require your feedback for suggestions, issues or bugs that need to be squashed. View the new documentation available for details on the new API.

Updated: 1st July 2019

Release Candidate 2 was released. See post for more details.

Please only test on a local environment or staging site. If you come across an issue, please report it via the GitHub repository.

Thank you and enjoy.