Co Cart Co Cart Versions Save

🛒 CoCart makes it easy to decouple your WooCommerce store via a customizable REST API that takes the pain out of developing – allowing you to build fast and flexible headless stores.

v4.0.1

3 days ago

Bug Fix

  • REST API: Class ReserveStock not found when adding products to cart.

Developer note: A line was unintentionally removed that calls the class for use.

v4.0.0

4 days ago

In this release, we are happy to provide some of the various improvements made through out the plugin that were from the originally planned v4 release. These improvements are backwards compatible but one change is not. See the developer note for details.

Developer note: This release requires the quantity parameter to pass the value as a string for both adding items or updating items. If you are not new to CoCart then please update your code to account for this change.

Find out more about what’s new in CoCart 4.0 in our release post!

Hope you enjoy this release.

What's New?

  • REST API: Added batch support for cart endpoints listed below. (API v2 supported ONLY) See article for batch usage.
    • Add item/s to cart.
    • Clear cart.
    • Remove item.
    • Restore item.
    • Update item.
    • Update cart.

Bug Fixes

  • Plugin: Fixed various text localization issues.
  • REST API: Access-Control-Allow-Credentials being outputted as 1 instead of true. Solves issue 410. Thanks to @SebastianLamprecht for reporting it.
  • REST API: Update cart requests no longer fails and continues to the next item if an item in cart no longer exists.
  • REST API: Products API schema has been completed for v1.
  • REST API: Products API schema has been corrected for v2.
  • WordPress Dashboard: Plugin suggestions now lists CoCart JWT Authentication add-on.

Improvements

  • REST API: Now checks if the request is a preflight request.
  • REST API: Error responses are now softer to prevent fatal networking when a request fails.
  • REST API: Callback for cart update now passes the cart controller class so we don't have to call it a new.
  • REST API: Cart schema tweaks for API v2.
  • REST API: Cart and Product schema are now cached for performance for API v2.
  • Plugin: Added more inline documentation for action hooks and filters.
  • Plugin: Improved database queries.
  • Plugin: Updated to latest WordPress Code Standards.
  • WordPress Dashboard: Added CoCart add-on auto updates watcher.
  • WP-CLI: Updating CoCart via command will now remove update database notice.

Developers

  • REST API: Two new headers return for cart responses only. CoCart-API-Cart-Expiring and CoCart-API-Cart-Expiration.

These two new headers can help developers use the timestamps of the cart in session for when it is going to expire and how long until it does expire completely.

  • REST API: Error tracking is returned with the error responses when WP_DEBUG is set to true to help with any debugging.
  • REST API: Class aliases have been added to API v2 controllers after changing the class names for consistency.

Compatibility

  • Tested with WooCommerce v8.8

v3.12.0

1 month ago

Security Patch

📢 This release solves a validation issue for both versions of the Products API when accessing an individual product. It is important that you update to this release asap to keep your store secure.

Bug Fixes

  • Corrected: Products API v1 Schema for weight object.
  • Added: Missing Products API v1 Schema for Image sizes.
  • Fixed: Schema product type options to match with parameters.
  • Fixed: Products API returning custom attributes with special characters incorrectly. Solves issue 401
  • Fixed: Some requested data was not sanitized.

Compatibility

  • Tested with WordPress v6.5

v3.12.0-pre.1

2 months ago

Security Patch

📢 This release solves a validation issue for both versions of the Products API when accessing an individual product. It is important that you update to this release asap to keep your store secure.

Bug Fixes

  • Corrected: Products API v1 Schema for weight object.
  • Added: Missing Products API v1 Schema for Image sizes.
  • Fixed: Schema product type options to match with parameters.

v3.11.2

2 months ago

Bug Fix

  • Fixed: PHP warning for array_values() when filtering the fields to return for the Cart API.

Improvement

  • Corrected a spelling error with plugin review notice.

v3.11.1

2 months ago

Bug Fix

  • Fixed: Passing arguments for cocart_do_deprecated_filter incorrectly.

v3.11.0

2 months ago

What's New?

  • Products API: Gets all registered product taxonomies.
  • Products API: Added support to query product_variations by attribute slugs.
  • Products API: Product meta data is now filterable. (API v2 ONLY) See below for notes.

For Developers

  • Products API: Filter introduced cocart_products_ignore_private_meta_keys allows you to prevent meta data for the product to return. (API v2 ONLY)

This can be useful should a 3rd party plugin expose private data that should not be made available to the public. For example a plugin that is designed to use web push notifications and exposes an email address.

  • Products API: Filter introduced cocart_products_get_safe_meta_data to control what product meta is returned. (API v2 ONLY)

Improvements

  • Cart API: Small performance improvement returning the items.
  • Products API: Set date query column to post_date if after and before date query is set.
  • Products API: Added missing date after and date before arguments.
  • Products API: Added sanitize callbacks missing from a few arguments.
  • Products API: Set default orderby to date should WooCommerce not have a default catalogue value set.

v3.10.9

2 months ago

Improvements

  • Uses less memory.
  • Sends headers with send_headers() instead of header()

Compatibility

  • Removed "DONOTCACHEPAGE" constant.

v3.10.8

2 months ago

Improvements

  • Plugin suggestions now returns results much better the first time they are viewed.
  • Store API only returns the version, routes and link to documentation if "WP_DEBUG" is true.
  • Deprecated action hooks and filters return messages if actually triggered.

Compatibility

  • Tested up to PHP v8.3.0

v3.10.7

2 months ago

For Developers

  • Introduced new filter cocart_products_get_related_products_exclude_ids to exclude products from related products.

Improvements

  • Added missing arguments for Products API when viewing the OPTIONS.

Bug Fix

  • Fixed: Calling retry() non-static for plugin suggestions when searching.

Compatibility

  • Tested with WooCommerce v8.6