Releases: co-cart/co-cart
v4.0.2
Bug Fixes
- REST API: Reverted a change that broke the ability to clear the cart. Was falsely notify it cleared when it did not.
- WordPress Dashboard: WooCommerce System Status was not echoing CoCart tips correctly.
Improvements
- REST API: Products API, Schema, added properties for reviews section in both API v1 and API v2.
Nightly
v4.0.1 - Hot Fix
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
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
andCoCart-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 - Security Patch
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 - Security Patch (pre-release)
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
v3.11.1
v3.11.0
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
ifafter
andbefore
date query is set. - Products API: Added missing date
after
and datebefore
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.