CoCart Beta Tester

For those who like to stay ahead with the latest improvements that are in the works for CoCart, now you can with ease.

Simply download and install the CoCart Beta Tester and you will then be able to start running bleeding edge versions of CoCart from the GitHub repo.

This will replace your installed version of CoCart with the latest tagged pre-release on GitHub.

Use with caution, and not on production sites. You have been warned.

  1. Download the latest release from the GitHub repository.
  2. Go to WordPress Admin > Plugins > Add New.
  3. Click Upload Plugin at the top.
  4. Choose File and select the .zip file you downloaded in Step 1.
  5. Click Install Now and Activate the CoCart – Beta Tester.

Happy testing!

CoCart Needs You

CoCart now needs your help more than ever for the next major update v3. Your feedback has been great but for the next API I want to take it a step further and request your participation in it’s development.

CoCart is designed for developers and for v2 of the API, it needs to be developed by those developers who use CoCart.

Originally, my plan for CoCart v3 was to introduce a major re-write of the cart system that the current API relies on. However, that was because at the time I was figuring out on how to support guest customers with the default WooCommerce session handler.

Now that problem has been solved without the need of a major re-write, we can move on to the actual responses developers require.

The most requested to improve CoCart was additional information returned for the cart and for certain fields to be formatted a certain way. Well now is your chance to actually add those details yourself so the cart returns what you need out of the box without the need to use filters.

That doesn’t mean that filters are being removed. There will always be something unique that a developer will require that is not for all.

So what can I add?

The new API is not to focus on adding new core features but to add support where needed and to format data the right way that is compatible for all frameworks without the need to re-format the data again after you get the response.

How do I get involved?

It’s actually fairly easy. All that you require is a GitHub account, fork the CoCart repository and contribute to the v3.0.0 branch with your pull request.

An enhanced issue must be made before hand explaining in detail what it does and why it should be added.

There are also issues already created that may need a PR so if I have not started on those your are welcome to go ahead and try working on one yourself.

I will then review and possible respond with a comment before deciding to merge it. If your PR gets approved, send me your WordPress.org username and I will add you as a contributor when v3 is released.

That’s it. That simple.

So test out what the new API has so far and get coding.

FYI, the changelog will provide some documentation as to what is new.

If you have any questions. Leave it in the comments section and I will get back to you asap.

WordPress 5.5 REST API Changes

WordPress v5.5 is just around the corner and introduces a change to the REST API that affects how public API’s are called. What does that mean? To put it simply, the WordPress core REST API is a private API which requires a permission check before the called API can return any data.

Because this happens without any warning to the user, if the permission callback is unintentionally omitted or misspelled, the endpoint can end up being available to the public. Such a scenario has happened multiple times in the wild, and the results can be catastrophic when it occurs.

https://make.wordpress.org/core/2020/07/22/rest-api-changes-in-wordpress-5-5/

So what does that mean for CoCart? Well nothing major. However, as CoCart is a public API, the use of adding a permission_callback was not needed before but without it when used with WordPress v5.5, it will now cause all the REST API routes to trigger a _doing_it_wrong() warning (see #50075).

CoCart v2.5.0 is a minor release and adds support for the coming change made to the REST API in the WordPress v5.5 to allow CoCart to still work as a public REST API.

No changes have been made to the CoCart API itself.

Just made sure that each route is using the permission_callback correctly so the REST API returns error free. This is the same for CoCart Pro and it’s add-ons.

If you are still using the legacy API wp-json/wc/v2/cart, when you update WordPress to v5.5, you will no longer be able to use it as it will no longer register.

I highly recommend that you update to the latest API version of CoCart.

Luckily that is only 15.5% of the user base which has slowly been updating to CoCart v2.

In preparation for the release of WordPress v5.5, I have a release candidate that I wish for you to test should you be testing the latest beta or nightly build of WordPress v5.5

WordPress v5.5 is scheduled to be released on 11th August so I’m looking at releasing CoCart v2.5.0 on the 10th August so you have a day in-advanced to update so you are ready.

Mix and Match Products Supported

Another great WooCommerce extension now supports CoCart. It’s called Mix and Match Products and it’s also developed by Kathy Darling. I was happy to help with it’s development and guide Kathy adding support for the REST API.

If your selling cases of wine, dozen donuts, fruit baskets or even a six-pack of T-shirts. Mix and Match is ideal for offering similar products in bulk containers. Perfect for encouraging customers to buy in bulk without forcing them to buy items that don’t interest them.

Now you can support these bulk product types in your headless store.

View the CoCart documentation to see how you can add a Mix and Match Product to the cart from your customers selection.

I’ve developed a WooCommerce extension

That’s great. Always looking to support more WooCommerce extensions. If your extension provides a new product type or extends with new product features that requires support in CoCart, I look forward to helping you out.

A boilerplate is available to give you a head start.

CoCart v2.2.0 is now available!

June has been a busy month both in the world and development for CoCart.

Finally got guest customers supported and 5 small releases that provided fixes along the way that ensured 100% compatibility with WooCommerce’s latest release and conflicts found on the frontend.

I now have one WooCommerce extension officially supporting CoCart and another on the way.

Feedback again has been tremendous and your constant support towards me so that I am able to provide you what I need has been a great help. ?

It’s especially nice to see customers donating more for the constant updates I have been giving. If you like to give, you can support me by buying me a coffee or simply purchase CoCart Pro while it is on sale until the end of June.

Today I have released v2.2.0 which is a minor release (which means everything is backward compatible with the previous version) that adds support for CORS headers should you need them set and a few tweaks to the plugin just to make it a little bit better.

As always, I recommend creating a backup of your site before updating.

Enjoy!

Changelog

  • NEW: Support for allowing all cross origin header requests to pass. Requires cocart_disable_all_cors filter set to false to enable.
  • NEW: Returned response after adding an item now returns product name, title and price just like the cart.
  • Tweaked: Improved validation for a variable product to return the product name correctly if variation attributes are missing.
  • Tweaked: Made sure that we check if we are making a request for CoCart API only.
  • Tweaked: CoCart logger will only log if WP_DEBUG is also set true.
  • Dev: New filters added for returning additional item data once added to cart.