This is the first release note post for CoCart Get Cart Enhanced. It introduces a couple of things. First checking the cart contents and applied coupons.
Validity of the items and stock is checked before returning the cart. The same for the coupons. This gives a more realistic cart in real time before the order is made and allows you to inform the customer should any item or coupon no longer be available or valid.
Second, is to give developers a preview of the new default cart response coming in CoCart v3.0 API v2.
What’s different and how do I preview?
Over time this add-on has been updated to improve the response based on the feedback by it’s users. One thing in particular that developers wanted was not to have the product prices and totals pre-formatted.
This suggestion allows more control, which means adding more information like the currency used for the store.
To preview the new cart response for CoCart v3.0 API v2, you need to use the filter cocart_preview_api_v2. You can copy the and paste the code below.