CoCart v3 in the Future

My plan for CoCart v3 is to introduce a major re-write of the cart system that the current API is relying on. Sounds big and your right, it is going to be a major achievement. πŸ¦Έβ€β™‚οΈ

While the API it’s self will not change much, the core of the API will have a new backbone rather than relying on the cart in the core of WooCommerce. Meaning that the majority of WooCommerce functions used will be in the core of CoCart with the necessary adjustments required.

This also insures that any changes made in the future to the cart in WooCommerce does not effect how CoCart functions in the long run.

Why the change?

In short, WooCommerce’s handle on sessions is not designed well for a REST API. Which is why I will be working on creating a new cart system that is designed for the REST API.

  • Better session control – will include the ability to switch between customers when authenticating. No more merged carts without clearing it first.
  • Additional fees support – will no longer run as an independent API.
  • Processing orders – cart is converted to an order ready to be paid so less coding and using WooCommerce’s REST API to do it.
  • and possibly more.

What about v2.1?

CoCart v2.1 is near, development was put on hold since December 2019 mostly for personal and technical reasons but I am back on track and making progress for beta 5.

While the cart improvements may not be perfect due to the session control system currently used, it is in the right direction and will provide a number of requested improvements.

CoCart v3 will include all the changes made in v2.1 and be improved upon.

Community and Feature Requests

The CoCart community has been great and a big help from the community has been the feedback. Without you, CoCart would not be possible.

There have also been many feature requests coming in. While I have started working on some of these features, they are not currently worth my time finishing and releasing until the core of CoCart is more stable and supportive of those features.

These features will of course be added as part of CoCart Pro or as an additional add-on depending on the support required for those features.

My hope is that with the new cart system, these features will be easier to provide and more open opportunities for developers will be available.

Some stats… everybody loves stats

CoCart currently has just over 900 active installs and 35.7% of them are still using version 1. On a surprising note, CoCart has been around for almost 2 years already since version 1 was released on on 26th February, 2018. That’s 20 days away from it’s 3rd birthday. πŸŽ‰

Version 2 was released on 3rd July, 2019 and the last release was 4 months ago so it’s been slow progress with the releases.

My hope is to increase the active installs and plan to release updates in shorter cycles. Right now there is too much of a gap.

How can you help

CoCart is currently developed in my free time, it’s not a full time gig yet. While I am making sales with CoCart Pro, the sales are slow coming and that’s to be expected I think due to the core of CoCart still needs addressing with the session issue.

At the moment I am still working freelance which takes my time away from developing CoCart. So I have come up with an idea that I think for those who like and use CoCart will appreciate and that is to become a founder.

As a founder you will be allowing me to work on CoCart more frequently, get a copy of CoCart Pro, all the add-ons and best of all unlimited site usage.

Your company logo will also be linked and displayed on a special page including the GitHub repository as a thank you.

You can if you wish still just purchase CoCart Pro. It’s up to you.

A big thank you for the customers I have had so far and all those using CoCart.

If you have any questions about this post or the founders edition, feel free to contact me or have an open discussion with me via Slack next Monday at 4PM GMT+1.

Thank you. πŸ™‚

Looking to Hire a Node.js Developer

Updated: 25th November, 2019

Dead line for submitting applications is now closed!

I am in need of assistance from a Node.js developer to complete an API client to easily interact with the CoCart REST API.

I have forked one from WooCommerce and started to make adjustments but I am not a Node.js expert yet. Still learning, which is why I need your help. If you are selected for the project you will be given access to the GitHub repository that I have started.

To give you some idea as to what you will be working on to build a version for CoCart, please take a look at this repository.

I take it that after reading this far you are interested so here is what I require:

  • Make authentication optional as the client needs to work with the REST API for logged out users as well.
  • Make sure any parameter that an endpoint has whether it’s required or optional, it passes without fail. I’m sure this is already done but just need verification.
  • Make sure all dependencies for the Node.js are all good and working together. No major security issues.
  • Create unit tests. (Leave to last)
  • Clear written examples on how to use the Node.js for documentation.
  • Instructions for me on how to maintain the project.

The client will be open-source once the project is completed and the CoCart documentation will be updated to include examples for the Node client.

I will need to see code examples preferably via your GitHub or BitBucket profile. Your welcome to share any work elsewhere that I can view that is similar to what I am want to achieve.

The job is remote so you can work anywhere and since we are only making adjustments to a project that is already complete it should not take any longer than a day. I do have a set budget in mind but would like to know also what you would charge for the set task.

In addition to finishing the client you, will be given lifetime access for CoCart Pro.

Application deadline is 22nd November, 2019

After the deadline I will review the applications and get back to you asap. Happy to answer any questions you may have too.

Thank you for reading and your interest. πŸ™‚

Adding products to the cart

Want to know how to add products to the cart with CoCart? Checkout these examples below.

Simple Product

Simple products are exactly that. Just the product ID and the quantity are required.

Variable Product

Notice for a variable product you pass along the attribute the customer selected too. Variable products may have more than one attribute and some variations maybe set to allow attributes to be open to any option so passing along the attribute the customer selected is always best with multiple options.

When adding the attribute make sure you start the key with attribute_pa_ followed by the attribute slug of the option selected and then the value.

First 10 paying customers

When developing a new REST API that has so many conditions, it can be frighting. However, when broken down into parts, supporting the core features is achievable.

When I started working on CoCart last year, it was just a prototype. This was version 1. I wasn’t new to using a REST API but new to creating a REST API.

It was around the same time I stopped working as a contractor to put more time to build a better version. One that was more open for developers to request specific parameters, filter in new data and have the ability support popular WooCommerce extensions or 3rd party plugins.

In order for me to do a free and a premium version of CoCart the API needed to be more flexible. It would not have worked on the current API and with the changes made in WooCommerce since the release of my prototype, it was a necessary decision to move away from extending WooCommerce’s REST API to being a REST API of it’s own.

CoCart v2 was released on 3rd July, 2019 and by the time I launched CoCart Pro on the 23rd August 2019, almost half of my user base already upgraded to version 2 which is the minimum requirement in order for CoCart Pro to work and in just a little over a month I already have my first 10 customers.

I couldn’t be more pleased with the results and I already have my first customer review.

Just wanted to say thank you for creating this plugin! I’m currently developing a new Ionic app which uses WordPress with WooCommerce as its base store and needed something to interact with WooCommerce powerful abilities and extensibility via some sort of API and yours fitted perfectly.

Keep up the good work!

This completes the first milestone. More features and support is currently in development and I can’t wait to share more details on them soon.

Just like to say a big thank you to my first 10 customers and I look forward to the next 10.

CoCart v2.1.0-beta.4

I am pleased to share a new beta release for CoCart that combines both a new endpoint to access products without authentication and cart support for guest customers.

To test out the new features please view the WIP (Work in Progress) section of the documentation.

If you would like to know more about the coming version, checkout these two posts.

Changelog for this release

  • Added: Counter for carts in session in WC system status.
  • Corrected: Incorrect bool value used for initial item added to cart.
  • Corrected: Value typo with cart key when storing cart to the database.
  • Corrected: Version returned in WC system status for CoCart.
  • Removed: Tax status and tax class for products data returned.
  • Tweak: Fixed create_tables() should not be called statically
  • Tweak: Fixed get_cart() not called statically.


  • NEW: Added a new endpoint for fetching products or a singular product in READ-ONLY. No authentication required.
  • NEW: Added support for guest carts.
  • NEW: Cart data are stored in a new database table.
  • NEW: Added plugin details to WooCommerce System Status.
  • NEW: Added uninstall.php file to delete tables and options.
  • Dev: Clear all carts stored in session via the Tools section of WC System Status.
  • Dev: Cart expiration can be filtered if the default 48 hours is not to your liking.
  • Dev: Cart key can be filtered before storing cart in the database and creates a cookie on the customer’s device.


You cannot use this beta release with Product Add-ons installed as it will override the product routes. Product Add-ons is better and contains more options.

I look forward to any feedback you have.

Thank you.