CoCart v3.0.0 Release Candidate 3

I’m excited to announce that CoCart v3 Release Candidate 3 is now available for testing! You can either download it directly from GitHub or install the CoCart Beta Tester plugin.

This release fixes a few minor bugs and tidies up the code a little more. This is the final release candidate before launching real soon.

What’s New since CoCart v3 RC 2?

  • NEW: Added PUT to Access-Control-Allow-Methods
  • Fixed: Undefined cart_key.
  • Fixed: Undefined object property ID.
  • Fixed: Check $user_id is not empty.
  • Fixed: Passed the product ID & quantity values for add to cart message that is finally added to cart to return the message correctly, specifically for variable products.
  • Improved: Various inline docs here and there.
  • Removed: Various lines of code not used any more to clean it up.

Testing

If you discover any bugs during the testing process, please let me know by logging a report on the GitHub repository. There I can manage it better and get on the issue asap.

CoCart v3.0.0 Release Candidate 2

I’m excited to announce that CoCart v3 Release Candidate 2 is now available for testing! You can either download it directly from GitHub or install the CoCart Beta Tester plugin.

I’m hoping now this release candidate is the last one but again, any remaining feedback you provide testing this release candidate is most appreciated.

What’s New since CoCart v3 RC 1?

  • NEW: Compatible with WP-GraphQL WooCommerce.

As both CoCart and WP-GraphQL WooCommerce extension use their own session handler, there was a clash.

With this release a condition has been added to check if a graphql request was being made in an area that CoCart also shares.

Now both plugins can work side by side. 👍

  • NEW: Added notice for when item is removed from cart.
  • Fixed: Authentication with login API. Incorrect permission check used. 🤦‍♂️
  • Localization: Added missing translator notes.

Testing

If you discover any bugs during the testing process, please let me know by logging a report on the GitHub repository. There I can manage it better and get on the issue asap.

CoCart v3.0.0 Release Candidate 1

Didn’t you just release a beta?

Yes I did. The release post got delayed as I found a few other bugs while writing the documentation. Read the previous post so you have the full log on the new additions and corrections.

I’m excited to announce that CoCart v3 Release Candidate 1 is now available for testing! You can either download it directly from GitHub or install the CoCart Beta Tester plugin.

CoCart v3 is so close to launching now. Any remaining feedback you provide testing this release candidate is most appreciated.

What’s New since CoCart v3 Beta 4?

  • New: Added success notice for when a simple or variable product was added to cart.
  • Fixed: Authenticating on any API while requesting cart key.
  • Fixed: Product validation for adding grouped products.
  • Fixed: Response when requesting to return items after adding a grouped product.
  • Improved: Response returned when removing an item already removed from cart.
  • Improved: Response returned when restoring an item already restored to the cart.
  • Tweaked: All links pointing to CoCart.xyz
  • Updated: Getting started page.

Documentation

The documentation for v3 is now ready for API v2. You will find a section called breaking changes that will explain differences between the two API versions.

You can use the upgrade guide to help with the routes.

Node.js is now the default language tab and the menu navigation has been improved.

While there is still a lot to document, (mostly filters, I added way to many for v3) you can see all the options that are available for the new API version.

If you need help with any of it or you spot an error in the documentation, let me know via the live chat.

Testing

If you discover any bugs during the testing process, please let me know by logging a report on the GitHub repository. There I can manage it better and get on the issue asap.

CoCart v3.0.0 Beta 4

I’m excited to announce that CoCart v3 Beta 4 is now available for beta testing! You can either download it directly from GitHub or install the CoCart Beta Tester plugin.

CoCart v3 is just around the corner so any remaining feedback you provide testing this beta that needs solving before releasing a release candidate is most appreciated.

What’s New since CoCart v3 Beta 3?

  • NEW: Added login route to help with customer flow.
  • NEW: Introduced saving the cart hash in session.
  • NEW: Support for JWT Auth plugin.

Changes since beta 3

  • Improved: Copy for readme.txt
  • Improved: Check cart is completely empty not just the cart contents.
  • Improved: Product title now returns in status when item is removed from cart.
  • Corrected: Redirect to current page when hiding admin notice.
  • Added: Schema for count items API.
  • Added: Option to keep removed items in session when clearing the cart.
  • Deprecated: cocart_return_empty_cart filter.
  • Fixed: Install date value when product review notice loads for the user.
  • Fixed: Validation of variable product.
  • Fixed: Product validation failing before adding to cart to return error response.
  • Fixed: Formatting variation data for custom option.
  • Fixed: Issue with a non-numeric value encountered.
  • Fixed: Session failing returned response if cart is empty.
  • Fixed: Cart source when cart was first created no longer updates.
  • Merged: Changes added in CoCart v2.9.2
  • Moved: Deleting cart API under session API for admins only.
  • Tweaked: Cart response now returns empty only if no cart exists or the cart is completely cleared. This allows for only removed items left in session to be returned to the cart without issues.
  • Dev: Forked get_customer_unique_id() from WooCommerce session handler for backwards compatibility. Introduced to help with unit tests in WooCommerce since version 5.3. Not needed for CoCart but best to have it and not need it than not have it and need it.

Testing

If you discover any bugs during the testing process, please let me know by logging a report on the GitHub repository.

CoCart v3.0.0 Beta 3

I’m excited to announce that CoCart v3 Beta 3 is now available for beta testing! You can either download it directly from GitHub or install the CoCart Beta Tester plugin.

CoCart v3 is very close to completion so any feedback you provide testing this beta that needs solving before releasing a release candidate is most appreciated.

I’m aiming to have CoCart v3 released sometime around mid to late April. Up until then I will be working on preparing CoCart Pro to be ready for the big update.

What’s New since CoCart v3 Beta 2?

CoCart can be found under the “Extensions” section.

New: Added the CoCart menu to the new WooCommerce Navigation Menu if it exists or is enabled.

WooCommerce will make this enabled by default in the future and as CoCart is WooCommerce related, it is best that users have everything related to WooCommerce under one roof.

? NEW for API: Cart formatting applied to clean up get cart response. This is similar to what the Get Cart Enhanced add-on does by removing the item key as the parent array making it easier to look up the items in the response.

✅ NEW for API: Added cart validation, check each item is in stock and applied coupons are still valid. If anything is not valid an error notice will be added which returns in the response.

Should for some reason the CoCart session table not exist in the database. To help prevent crashing the site when viewing the WooCommerce System Status page, it will check if the table exists before trying to return results.

If it is indeed missing it will simply return “Missing session table“. Should this be the case a tool is available to verify and create the missing table.

WooCommerce System Status will check if the CoCart session table exists before returning results.

Changes since beta 2

  • Improved: Plugin activation, environment check and install CoCart in one go for faster performance.
  • Tweaked: Redirect user to plugins page after dismissing a notice.
  • Tweaked: WooCommerce System Status will check if the CoCart session table exists before returning results.
  • Tweaked: Getting Started page to link new plugin section for add-ons.
  • Tweaked: Admin notices style.
  • Tweaked: Autoloader for WooCommerce Admin notes.
  • Tweaked: Added short descriptions to WP-CLI commands should the user do wp cocart help.
  • Fixed: Check if DISABLE_WP_CRON constant is defined.
  • Fixed: Routes returned for store API.
  • Fixed: Callback to WP-CLI commands.
  • Dev: Made sure SCSS assets do not export when downloading GitHub source zip of any release.
  • Dev: Merged updates from v2.9 and v2.9.1

For Developers

  • Dev: Introduced cocart_before_get_cart filter for modifying the cart data in any capacity before the cart response is returned.
  • Dev: Introduced cocart_cart filter for modifying the cart response in any capacity.

Minimum Requirements

PHP requirement has been bumped to v7.3 to ensure you are getting the best of CoCart.

Testing

If you discover any bugs during the testing process, please let me know by logging a report on the GitHub repository.

CoCart Lite v2.9.1 Release Notes

Excited to announce that CoCart Lite 2.9.1 is now publicly available! This is a minor release so everything is backwards compatible with the previous version.

As always, it is recommend to create a backup of your site before updating.

What’s new in CoCart v2.9.1?

This release fixes a problem with merging cart contents together. It’s a feature that WooCommerce provides in the core and one that was not working out of the box with CoCart.

What is this feature for? Well it’s simple. The feature is triggered when a customer logs in but started as a guest. They already added items to the cart but also have items added to the cart as a registered customer.

So for any items that are not already in the cart, they are merged together. Now you only have one cart of all the items you added. This will then destroy the guest cart as it is no longer needed.

Pretty cool. ?

In addition to this fix. A change has been made to further enhance the API for headless development. The cookie that stores the cart information now adds the samesite attribute to None. This article explains more about SameSite Cookie Attribute.

To help with those who wish to change the default attribute value, a new filter cocart_cookie_samesite has been introduced to allow you to override it. Before this attribute was added the default value was lax after 20th February 2020 if the attribute is not applied.

This cookie change is only available for those who use PHP 7.3 or above and will be the minimum requirement for CoCart v3 once it is released so I recommend that you update to PHP 7.3 or higher soon.

Why was this cookie attribute added so late? To be honest it just got forgotten about due to Covid-19, personal health and working on other improvements for CoCart. I only just recently got reminded about it. ?

If you have tips or feature requests to help CoCart improve for your development then please send me feedback or make a enhancement request via the GitHub repository where I can manage things better.

I like to thank Joel for this release who spent a little of his weekend helping me to get this done.

Database changes

This release does not introduce any changes to the database.

Documentation

This release does not introduce any changes to the documentation.