[WordPress] 外掛分享: CoCart – Headless REST API for WooCommerce

首頁外掛目錄 › CoCart – Headless REST API for WooCommerce
WordPress 外掛 CoCart – Headless REST API for WooCommerce 的封面圖片
1,000+
安裝啟用
★★★★
4.9/5 分(21 則評價)
48 天前
最後更新
問題解決
WordPress 6.3+ PHP 7.4+ v4.8.3 上架:2018-02-25

內容簡介

重要訊息

自 2022 年 10 月 5 日起,WordPress.org 中的 CoCart 外掛將不再進行重大更新,此舉是為了專注於付費的 CoCart Pro 版本。只有針對錯誤的次要修復將會更新。請放心,您仍然可以永遠使用此外掛。

此外,雖然仍可使用 API v1,但不會再獲得支持。

CoCart:為 WooCommerce 打造的 #1 電商 RESTful API,可擴展至無界面開發。

使用 CoCart 將您的 WooCommerce 業務推至全新高峰,使用無界面電商。

CoCart 可自定義的 WooCommerce REST API,讓您將 CMS 與呈現層分離,開發人員可使用熟悉的框架和工具。

🥪 API

CoCart 支援管理使用者會話,雖然也有其他替代選項可供使用;但其使用限於與 WordPress 安裝同源的應用程式。這是因為 WooCommerce 使用 cookie 儲存使用者會話權杖。

CoCart 提供了更改此行為的實用程式,在任何購物車請求期間傳遞所需的資訊至 HTTP 標頭,以便客戶端進行緩存。使用 HTTP 授權標頭則是選擇性的,使使用者可以像訪客一樣購物。

🛒 購物車 API

透過產品 ID 或 SKU ID 將簡單、變化和分組產品添加到購物車,個別或批次更新購物車項目等。該流程簡單易懂,每次都會返回更新過的購物車回應,所有總計和庫存檢查都已計算完成,讓您更輕鬆地更新 UX/UI。

🛍️ 產品 API

訪問您的商店中的產品,以您喜歡的方式顯示,包括多個查詢,可幫助您通過產品類別、標籤、屬性等進行篩選。您甚至可以獲取已發表的評論,所有有關產品的資訊和其狀態,可幫助您開發 UX/UI。

➕ 額外功能

獲取商店資訊。
登入客戶/使用者。
登出客戶/使用者。
清空購物車。

對於管理員來說,作為額外的福利,CoCart 還提供以下功能:

獲取會話中的購物車。
獲取會話中購物車的詳細資訊。
查看已添加至會話中的購物車項目。
刪除會話中的購物車。

✨ 功能

CoCart 還提供了內建功能:

全新:覆寫被添加到購物車的簡單或可變產品的價格。
全新:將客戶的電子郵件地址附加到添加到購物車的商品。在被遺棄的購物車情況下非常有用。
透過網絡載入會話中的購物車。如果您沒有無界面結帳,並想使用原生的結帳功能,則非常有用。
支援訪客客戶。
支援基本驗證,包括以電子郵件作為用戶名。
支援 透過 WooCommerce 方法身份驗證。
支援多站點網絡。
不緩存 API,因此每次都會獲得新鮮的回應。
可跨多個域工作,支援跨來源資源共享 (CORS)!因此,可以將多個前端連接到一個後端。
可讓您過濾 CoCart 以使其成為白標記。

隨 CoCart 一起提供的還有:

详细的文档
教程和代码单元测试报告
密码保护API文档
帮助和支持

外掛標籤

開發者團隊

⬇ 下載最新版 (v4.8.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「CoCart – Headless REST API for WooCommerce」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

CoCart: The BEST REST API for decoupling WooCommerce stores
CoCart is a developer-first REST API to decouple WooCommerce on the frontend. It gives you everything you need to start developing your own custom storefront. CoCart Plus plugin extension unlocks more to complete the shopping experience out the box.
Build the modern and scalable storefront of your dreams with confidence independent of WordPress using frameworks like Astro, React, Vue, or Next.js, gaining complete control over your customers experience no matter what your store sells.
CoCart was built for developers in mind. With hooks and filters available so you can extend or integrate custom functionality for your headless setup.
Why 1,000+ developers choose CoCart
🚀 Core cart functionality (FREE)
* ✅ Zero learning curve – Built on WooCommerce Data Stores with familiar hooks, ensuring broad plugin compatibility.
* 🔐 Session management – Cookie-less, database-stored sessions. Handle concurrent users without breaking a sweat.
* 🛒 Essential cart operations – Add, remove, update items and calculate totals in simple API calls.
💻 Developer experience that doesn’t suck
* 🔑 Authentication that makes sense – Email, username, or phone login. No admin API keys to juggle.
* 🌍 CORS just works – First-party CORS support means your frontend connects instantly, no configuration hell.
* 🧩 Extendable Callbacks – Add your own logic without writing new API routes.
* 📦 Bulk Cart Requests – Combine multiple API calls into one for better performance.
* 📊 Cart Insights – Monitor all cart sessions, including those nearing expiration or already expired.
🎯 WooCommerce compatibility, guaranteed
* 🛠 Native checkout support – Load any cart session into WooCommerce’s checkout. Your payment gateways work seamlessly.
* 🔎 Product search – Query by name, SKU, or ID — authenticated or not — with flexible filtering.
* 💸 Name Your Price support – Donation-based pricing with built-in flexibility.
Want more? Upgrade to CoCart Plus.
First time using CoCart? Check out the documentation and create a sandbox to try it out.
💬 Loved by developers worldwide
★★★★★

“An excellent plugin, which makes building a headless WooCommerce experience a breeze. Easy to use, nearly zero setup time.” – Harald Schneider

★★★★★

“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

★★★★★

“This plugin saved me tons of work and it is working amazingly! The plugin author provides fast and high-quality support. Well done!” – @codenroll

💼 Need More Features? Upgrade to CoCart Plus
Additional features in CoCart Plus:

🎫 Coupon Management – Apply discounts, promo codes, and boost conversions.
🚢 Shipping Calculations – Real-time shipping rates and method selection.
💰 Cart Fees – Add handling fees, rush charges, or custom pricing logic.
🥪 Advanced Batch API – Process multiple cart operations in a single request for lightning speed.
🕒 Rate Limiting – Prevent API abuse and maintain high performance under load.
🧾 Checkout – Complete an order and take payment using any supported gateways by WooCommerce. (Coming Soon)
💲 Subscription Support – Complete new subscriptions or renewals automatically or manually. (Coming Soon)

🔓 Ready to Go Fully Headless?
Join thousands of developers and agencies building with CoCart — the REST API that takes WooCommerce further.
👉 Upgrade to CoCart Plus and build the future of eCommerce today.
★★★★★

“Thanks for doing such 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

See our wall of love for more developer testimonials.
💜 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.
👍 Add-ons to further enhance CoCart
We also have add-ons that extend CoCart to enhance your development and your customers’ shopping experience.

CoCart – CORS enables support for CORS to allow CoCart to work across multiple domains.
CoCart – Rate Limiting enables the rate limiting feature for CoCart Plus or higher.
CoCart – JWT Authentication allows you to authenticate via a simple JWT Token.

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
🧰 Developer Tools

CoCart Beta Tester allows you to easily update to pre-release versions of CoCart for testing and development purposes.
CoCart VSCode extension for Visual Studio Code adds snippets and autocompletion of functions, classes, and hooks.
CoCart Product Support Boilerplate provides a basic boilerplate for supporting different product types to add to the cart with validation including adding your own parameters.
CoCart Cart Callback Example provides you an example of registering a callback that can be triggered when updating the cart.

More information

Website.
Documentation
Subscribe to updates
Like, Follow and Star on Facebook, X/Twitter, Instagram and GitHub

💯 Credits
This plugin is developed and maintained by Sébastien Dumont.
Founder of CoCart Headless, LLC.
Contributors & Developers
You can help translate “CoCart” into your language.
INTERESTED IN DEVELOPMENT?
Browse the code on GitHub, or follow the CoCart development blog for the latest development updates. You can also follow @cocartapi on Twitter to stay up to date about everything happening with CoCart.
Please share your experience
We’d love to hear what you have to say. Share your experience and help others discover CoCart. It helps to keep the plugin going strong, and is greatly appreciated.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon