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.

Features

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

I look forward to any feedback you have.

Thank you.

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.

Retrieving Products should NOT be Hard

When building a headless store, quick and easy access to displaying information (such as products) is an important ability to have.

WooCommerce’s REST API is designed for creation, modifications and deletion. While it does let you retrieve products it’s blocked via an authentication requirement. ?

For products, this should NOT be a requirement. In preparation for the next CoCart release, I am introducing a READ-ONLY products endpoint. Allowing you to get the products without authentication.

The returned data is similar to WooCommerce’s REST API, the only difference is that certain parts are not included when returning the data which are designed for shop managers only.

Before it’s released to all users I am looking for testers to try it, provide your feedback on what may need tweaking or what you would like added or supported for products.

If you wondering how to use the new endpoint, I have that covered in a new section of the documentation called Work in Progress.

So how do I test this out?

Simple, just download the beta release below and install it on a none production site to try it out and follow the documentation under Work in Progress.

FYI

This beta release does not include the cart session that I am working on. It’s currently being held until I can get some feedback. If you want to try that out, please see this post for information.

Look forward to your feedback.

?

Authenticating with WooCommerce: Here’s how you can do it

Before now, WooCommerce authentication method was left open so any 3rd party REST API could use there authentication method. This gave no limits for users to authenticate with CoCart.

However, due to the added restriction for just their REST API, (which could change in the future as WordPress will provide a more generic version) CoCart could no longer authenticate the WooCommerce way on either version of CoCart’s API.

But have no fear as today version 2.0.5 provides a small update to re-enable WooCommerce’s authentication method again for CoCart.

CoCart users can now authenticate the #WooCommerce way again. ?

On top of the update, I’m going to show you how to authenticate the WooCommerce way.

Please Note

The guide below is assuming you are making requests with HTTPS.

First if you haven’t already created any keys you will need to go the advanced section in your WooCommerce settings.

From there you need to press Add key button. Then select the user who will be using the key. Set the permissions to READ/WRITE so all of the CoCart API is accessible. Enter a description if you wish and then press Generate API key button.

You will then be presented with your consumer key and secret which you will need to copy before moving away from the page as warned to the user in the screenshot below.

Once you have your key created you can then make any authenticated request with CoCart like so.

Fetching the cart while authenticating

If you would like to understand more about authenticating with WooCommerce read the authentication section in their REST API documentation.

Happy coding!

CoCart Pro Launched

Updated: 8th September 2019

I’m pleased to announce that CoCart Pro has now launched and it could not have come at a better time. Over 30% of the user base is now using version 2.0 of CoCart which is the minimum requirement to use CoCart Pro and CoCart has just passed 6000+ downloads. ?

I also like to thank those who have tested the beta’s, provided feedback and reported bugs found during it’s development. ?

It has been a great help to get the product ready and I have awarded you with a discount via e-mail as a thank you.

Support

Support will be provided via Slack. There you can contact me directly via DM when needed and use the other available channels to discuss with other users and developers, provide feedback, share ideas or even showcase what you have built with CoCart.

An invite will be sent to the customer via e-mail to which you must accept in order to receive the support.

Why Slack instead of e-mail? Well for one so I don’t get a full inbox, two, Slack is the perfect tool to communicate with my customers anywhere. We can see each other online and have a live conversation which is far more engaging than e-mail.

Lifetime Offer

For those who like to get on the best deals at launch, you can do just that.

For a limited time, you can get the lifetime tier for a one time purchase that will allow you to use CoCart Pro on unlimited sites, receive lifetime support and free updates.

What’s Next?

Over time I will be supporting more official WooCommerce extensions and improving the documentation for other code languages.

If you have any questions I recommend checking out the FAQ page. I may already have an answer.