Linux 软件免费装
Banner图

CoCart - Decoupling Made Easy for WooCommerce

开发者 sebd86
cocartforwc
ajayghaghretiya
skunkbad
sefid-par
mattdabell
joshuaiz
dmchale
JPPdesigns
inspiredagency
darkchris
mohib007
rozaliastoilova
ashtarcommunications
albertoabruzzo
jnz31
douglasjohnson
antondrob2
szepeviktor
更新时间 2024年12月13日 04:27
PHP版本: 7.4 及以上
WordPress版本: 6.7
版权: GPLv3
版权网址: 版权信息

标签

woocommerce cart rest-api headless decoupled

下载

2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 3.5.0 2.8.0 3.11.2 3.1.0 3.0.17 4.0.1 3.0.16 4.3.8 4.1.0 4.3.9 4.3.2 3.7.1 3.10.7 3.10.8 3.7.10 3.7.6 3.0.3 2.9.0 2.9.2 3.1.2 3.0.5 3.0.6 3.0.2 3.0.7 3.0.8 2.9.3 3.0.12 3.0.13 3.0.14 3.0.9 3.4.1 2.8.2 3.0.15 3.0.4 4.3.3 4.3.5 3.8.1 2.8.1 2.8.3 2.9.1 3.2.0 3.4.0 3.0.1 3.0.11 3.1.1 3.3.0 3.6.0 3.6.2 3.0.10 3.6.1 3.6.3 4.0.0 4.3.11 4.3.12 2.8.4 3.7.7 3.7.0 3.12.0 4.0.2 4.2.1 4.3.14 4.3.4 4.3.6 4.3.7 3.7.4 3.8.0 4.3.10 4.3.13 3.10.4 3.10.6 3.7.2 3.10.2 3.10.0 3.9.0 3.10.1 3.0.0 3.10.3 3.7.8 3.8.2 3.10.5 3.7.11 3.7.3 3.10.9 3.11.0 3.11.1 3.7.5 3.7.9 4.1.1 4.2.0 4.2.2 4.3.0 4.3.1 4.3.15 4.3.16

详情介绍:

Transform your WooCommerce store into a lightning-fast, decoupled shopping experience with CoCart — an open-source REST API designed to set your store free from WordPress's limitations. CoCart's developer-friendly API empowers you to build in modern frameworks like Astro, React, Vue, or Next.js, putting full control back in your hands and making complex customizations a breeze. Built by developers, for developers, CoCart is more than just an API extension. It’s a suite of tools that make managing a headless WooCommerce store seamless and fast—without the constraints of a traditional WordPress theme. Want to try it out? Why WooCommerce? WooCommerce provides a flexible, and efficient way to build cutting-edge stores with WordPress at it's core. If you are looking to provide a great store for your customers that is fast, decoupling your store is a no brainer, but accessing the front side via the REST API was missing which is where CoCart comes in. Why CoCart? Struggling with performance? Finding it hard to decouple WooCommerce from WordPress without hitting roadblocks? CoCart is here to eliminate the hassle of creating your own REST API endpoints for WooCommerce and provides all the essential features for a powerful, headless eCommerce experience. And this is just the start. With CoCart, your WooCommerce store can be faster, more flexible, and ready to take on any custom solution you dream up. ★★★★★
An excellent plugin, which makes building a headless WooCommerce experience a breeze. Easy to use, nearly zero setup time. Harald Schneider
🛒 Built for developers, by developers CoCart was created to fill a gap in the market for a robust, developer-friendly solution for headless WooCommerce stores. With a clean, intuitive API, CoCart lets you focus on what you do best: building unique and seamless shopping experiences. ★★★★★
Amazing Plugin. I’m using it to create a react-native app with WooCommerce as back-end. This plugin is a life-saver! Daniel Loureiro
📦 Serious about going headless? Unlock your store’s true potential. Upgrade to access premium features and extend CoCart’s capabilities to take your headless WooCommerce store even further. See what else we have in store. ★★★★★
This plugin saved me tones of work and it is working amazingly! The plugin author provides fast and high quality support. Well done! @codenroll
💜 Need Support? We aim to provide regular support for the CoCart plugin via our Discord community server. Please understand that we do prioritize support for our paying customers. 🧰 Developer Tools 📢 Testimonials - Developers just love it ★★★★★
Thanks for doing such a great work with this! Works exactly as expected and CoCart seems to have a nice community around it. The founder seems really devoted and that’s one of the key things for a plugin like this to live on and get the right updates in the future. We just got ourselves the lifetime subscription. Mighty Group Agency ★★★★★ This plugin works great out of the box for adding products to the cart via API. The code is solid and functionality is as expected, thanks Sebastien! Scott Bolinger, Creator of Holler Box
More testimonials See the wall of love. ☀️ Upgrading It is recommended that anytime you want to update CoCart that you get familiar with what's changed in the release. CoCart publishes release notes via the changelog. CoCart uses Semver practices. The summary of Semver versioning is as follows: You can read more about the details of Semver at semver.org 👍 Add-ons to further enhance CoCart We also have add-ons that extend CoCart to enhance your development and your customers shopping experience. They work with the core of CoCart already, and these add-ons of course come with support too. ⌨️ Join our growing community On Discord we have a community of developers, WordPress agencies and shop owners building the fastest and best headless WooCommerce stores with CoCart. Come and join our community Built with developers in mind Extensible, adaptable, and open source — CoCart is created with developers in mind. If you’re interested to jump in the project, there are opportunities for developers at all levels to get involved. Contribute to CoCart on the GitHub repository and join the party. 🎉 🐞 Bug reports Bug reports for CoCart are welcomed in the CoCart repository on GitHub. Please note that GitHub is not a support forum, and that issues that aren’t properly qualified as bugs will be closed. More information 💯 Credits This plugin is developed and maintained by Sébastien Dumont. Founder of CoCart Headless, LLC.

安装:

Minimum Requirements Recommended Requirements Automatic installation Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of CoCart, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New. In the search field type "CoCart" and click Search Plugins. Once you’ve found the plugin you can view details about it such as the point release, rating and description. Most importantly of course, you can install it by simply clicking "Install Now". Manual installation The manual installation method involves downloading the plugin and uploading it to your webserver via your favorite FTP application. The WordPress codex contains instructions on how to do this here. Upgrading It is recommended that anytime you want to update CoCart that you get familiar with what's changed in the release. CoCart publishes release notes via the changelog. CoCart uses Semver practices. The summary of Semver versioning is as follows: You can read more about the details of Semver at semver.org

屏幕截图:

  • Get Individual Product (API v2)
  • Add Item to Cart (API v2)

升级注意事项:

4.3.16 REST API: Authentication failed to validate incorrect login now fixed. 4.3.15 REST API: Fix persistent cart for registered users. 4.3.14 REST API: Deleting an item would not remove said item 100% due to a load conflict when authenticating. 4.3.13 SECURITY PATCH, PLEASE UPDATE TO STAY SAFE - THANK YOU! 4.3.11 REST API: Removed conflicting cache headers being sent. 4.3.10 REST API: Typo caused fatal for Products API (v2 ONLY). 4.3.9 SECURITY PATCH, PLEASE UPDATE TO STAY SAFE - THANK YOU! 4.3.8 REST API: Cart item prices correctly display based on tax options for the cart not the store. 4.3.7 REST API: Fixed rounding issue due to decimal separator being different with the cart total for some odd reason with WooCommerce. 4.3.6 Session Handler: Fixed merging of cart from guest. 4.3.5 REST API: Changed priority for sending headers from 0 to 1 to help with CORS. 4.3.4 Fixed an issue with CORS not returning header access-control-allow-origin. 4.3.3 Price of product is now consistent in the Cart API if store has no decimals. 4.3.2 Fixed 3 issues reported that affected CoCart since v4.2. 4.3.0 We have added a plugin update prevention system as a safety measure. See changelog for more. 4.2.2 We are reverting a change for destroying a session. See changelog for more. v4.2.1 Fix: When loading a cart from session a deprecated function was still triggered. It's now been removed to prevent failing. v4.2.0 Improvement: Optimized the session handler to be more compatibility with third party plugins. See changelog for more.

常见问题:

What does CoCart do?

CoCart provides a REST API that is ready to decouple WooCommerce away from WordPress. It allows you to search products by Name, ID or SKU, filter and return product data you need without authentication, manage cart sessions for customers and avoids the hassle of needing multiple requests to verify item and coupon validity in your cart. It also efficiently checks stock, calculates totals and fees, ensuring real-time accuracy so your responses return up to date every time. CoCart sources the WooCommerce’s Data Stores API and repeats most WooCommerce hooks to provide a wider array of support for most WooCommerce extensions out of the box.

Who should use CoCart?

Pretty much everyone, who wants a faster ecommerce store to improve their business. WooCommerce runs multiple requests for multiple steps. We avoid the hassle of needing multiple requests for these steps and process them all together. CoCart is perfect for ecommerce owners and developers who want to create an ecommerce app for mobile or a custom frontend shopping experience completely using the REST API.

Are there any limitations?

CoCart is designed with developers in mind allowing for complete control to customize or add support for a plugin to work with CoCart. CoCart does it's best to work out of the box but if there is a compatibility issue with a plugin that you would like to work with CoCart. We would be happy to hear about it.

What is the source of truth?

CoCart sources the WooCommerce’s Data Stores API and repeats most WooCommerce hooks to provide a wider array of support for most WooCommerce extensions out of the box.

Does CoCart work for multi-site network?

Yes. Just install CoCart and activate it on the sites you want to use CoCart.

Can I have WordPress running on one domain and my headless ecommerce on another domain?

Absolutely. That is what CoCart is mainly developed for. You just need to enable CORS. You can do that easily with the CORS add-on or you can manually enable it via the filters available in the documentation.

Will CoCart interfere with other plugins?

The majority of plugins are not REST API specific so it shouldn't. However, while we allow the source of truth for compatibility, there maybe a WooCommerce extension that returns data via an action hook that the REST API cannot understand during a specific action and may fail the response. If that does happen, simply report the situation with as much detail as possible on our GitHub repository and we will try our best to find a solution.

How do I set up CoCart?

You will first need WooCommerce installed and set up to your configurations. Then install CoCart, activate and your ready to start using the REST API following the API Reference provided.

Please check the requirements listed in the installation section.

Why use CoCart and not WooCommerce’s Store API?

WooCommerce’s Store API is designed for the Gutenberg blocks which only requires a fixed format and is still prone to be used on native storefronts. It also lacks validation on the server end which you will need and not every extensions yet works with it out of the box. A lot of valuable information and abilities that developers require to help them are also unavailable and if you try to use the Store API for headless you will have issues managing the cart sessions. CoCart's API is designed for decoupling away from WordPress with ease. It's a plug and play solution that just works out of the box. Also, improvements are always made to CoCart to ensure you get the best decoupled experience.

Do I need to have coding skills to use CoCart?

As this plugin provides a REST API built for developers, you will need to have some coding knowledge to use it.

Where can I find documentation for CoCart?

You can find the documentation here.

Can I change the formatting of values, add and change details to the responses?

You certainly can. There are over 100+ filters available to customize to your needs.

Why does CoCart use a custom session handler and table in the database?

If you're familiar with WooCommerce, you may be wondering why using a custom session handler at all instead of the WooCommerce default session handler? A number of reasons but the ones that really matter are.

  • The default session handler only supports cookies.
  • The default session handler only saves changes at the end of the request in the shutdown hook.
  • The default session handler has no support for concurrent requests.
  • The default session handler does not support guest customers.
  • The default session handler does not store additional data that maybe required to help you.
  • The default session handler does not allow support for POS capability.
  • More consistent with modern web.

Is "WooCommerce Shipping and Tax" plugin supported?

No. "WooCommerce Shipping and Tax" ignores any custom REST API's from allowing the ability to calculate the taxes from TaxJar except for WooCommerce Blocks and JetPack. We don't recommend it. However, TaxJar for WooCommerce plugin is supported.

Is "TaxJar for WooCommerce" plugin supported?

If you have "TaxJar for WooCommerce" v3.2.5 or above and CoCart v3.0 or above installed... then yes, it is supported.

Can I use any modern stack?

Yes you can use your preferred tools and favorite modern technologies like Astro ,NextJS, React, Vue, Ember and more giving you endless flexibility and customization.

Can I install/update CoCart via Composer?

Yes. The best method would be to install/update CoCart from the GitHub repository but you can also do so via https://wpackagist.org/

Where can I report bugs?

Report bugs on the CoCart GitHub repository. You can also notify us via the Discord community server in the #bug-report channel – be sure to search the forum to confirm that the error has not already been reported.

CoCart is awesome! Can I contribute?

Yes, you can! Join in on our GitHub repository and follow the development blog to stay up-to-date with everything happening in the project.

Is CoCart translatable?

Yes! CoCart is deployed with full translation and localization support via the ‘cart-rest-api-for-woocommerce’ text-domain.

Where can I get help or talk other users about CoCart core?

If you get stuck, you can ask for help in the CoCart support forum or join the CoCart Community on Discord where you will find like minded developers who help each other out. If you are in need of priority support, it will be provided by purchasing CoCart Plus or a higher tier.

Where can I find out more about the additional features?

Find out all relevant features and pricing information over on the official site.

My question is not listed here. Where can I find more answers?

Check out Frequently Asked Questions for more.

更新日志:

v4.3.16 - 12th December, 2024 Bug Fix v4.3.15 - 29th November, 2024 Bug Fix
Developer note: The last patch was not a great one but have found the root of the issue affecting carts for registered customers and is fixed in this one.
v4.3.14 - 21st November, 2024 Bug Fixes
Dev note: The conflict is not triggered only on DELETE request methods.
v4.3.13 - 21st November, 2024 Security Patch It appears that the rules of hidden and private meta is not respected and is still exposed on products that have such meta. This security patch ignores any meta data that is still leaking publicly without authorization. Wait what happened to v4.3.12? A commit error was spotted shortly after just releasing it and was taken down immediately. Improvement v4.3.11 - 20th November, 2024 Bug Fix Improvements Compatibility v4.3.10 - 14th November 2024 🔥 Hot Fix v4.3.9 - 14th November 2024 Security Patch
Just a note: The security issue isn't directly related to CoCart itself, but we’re here to help keep your store secure. Since CoCart is a public API, security patches will be released as soon as possible to prevent the issue from affecting your site, so you don’t have to wait for a fix from the plugin causing it. We recommend updating to this version if you’re using any WooCommerce plugins that might reveal public information. We want you to know that we would never publicly name a plugin with a security concern. However, if you notice any security issues with CoCart or another plugin connected to it, please report the security vulnerability so we can address it quickly. Thank you for helping us keep CoCart safe for everyone!
v4.3.8 - 7th November 2024 🐛 Bug Fix
Developer note: A commit was missing causing a fatal error when adding items to the cart.
Changes v4.3.7 - 5th November, 2024 Bug Fixes Changes Improvements v4.3.6 - 23rd August, 2024 Bug Fixes v4.3.5 - 9th August, 2024 Bug Fix v4.3.4 - 3rd August, 2024 Bug Fix v4.3.3 - 24th July, 2024 Corrections Improvements v4.3.2 - 19th July, 2024 🌋 Hot Fix This release fixes 3 known issues that were reported. issue #425, issue #426, issue #427 that has been affected since version 4.2 of CoCart. It was due to the optimizations made to allow CoCart to perform better. Unfortunately it had some unexpected side affects that were not picked up during testing. For that I am sorry. If you haven't rolled back to before 4.2 then this patch is highly recommended. Previous patch releases will also be updated to prevent further sites from experiencing these issues for those who like to update to specific version of the plugin. A hard lesson was learned here and hope you haven't lost trust in the plugin. I appreciate your feedback and support during this process. Please don't forget to backup your site before updating. Corrections Improvements v4.3.0 - 17th July, 2024 What's New? In this release we have added a plugin update prevention system as a safety measure. For the moment it will detect for compatibility with minor releases while we are making adjustments but it's designed mostly for detecting major changes. All CoCart add-ons that we release will now check for CoCart's requirements and will help you decide to update or not until your ready to do so. Improvements For Developers
These filters are for site admins more than anything.
Compatibility v4.2.2 - 12th July, 2024 Reverting We are reverting a change for destroying a session. Previous change causes a conflict with identifying the correct column with our session table and causes the cart not to clear. v4.2.1 - 11th July, 2024 Hot Fix When loading a cart from session a deprecated function was still triggered. It's now been removed to prevent failing. v4.2.0 - 11th July, 2024 In this release we have optimized our session handler making this release more compatibility with third party plugins. We also no longer use cookies as a backup for headless. This should also help with the confusion of needing to pass along the session cookie or reading the cookie to extract the cart key and help with user switching much better. A cart key is provided in both the cart response and returned headers. Saving the cart key in your own cookie or local storage is fairly straight forward.
We advise that you update on staging or local to check if you have used any of our experimental functions and filters that were added to the session handler to see if any have been deprecated. You can also see the list of deprecations below. If you have any questions about this update please contact us.
What's New? Improvements Deprecations Developers Compatibility v4.1.1 - 14th June, 2024 Bug Fix v4.1.0 - 6th June, 2024 In this release we are adding some quality of life improvements. What's New? Improvements Bug Fixes Deprecations Developers Compatibility v4.0.2 - 17th May, 2024 Bug Fixes Improvements v4.0.1 - 15th May, 2024 Bug Fix
Developer note: A line was unintentionally removed that calls the class for use.
v4.0.0 - 13th May, 2024 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? Bug Fixes Improvements Developers
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.
Compatibility v3.12.0 - 18th March, 2024 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 Compatibility View the full changelog here.