
內容簡介
Ninox - Integration for WooCommerce 是一款專為開發者設計的外掛,透過新增的 REST API 端點,能夠一次性獲取 WooCommerce 所有產品及其完整變體資料,提升資料存取效率。
【主要功能】
• 完整資料存取:單次 API 呼叫獲取所有產品及變體資料
• 性能優化:批次處理及高效查詢,適合大型產品目錄
• 安全認證:支援 WooCommerce API 金鑰認證及權限驗證
• API 文檔完善:清晰的文檔及範例請求和回應
• 快取支援:智能快取提升回應速度,減少伺服器負擔
外掛標籤
開發者團隊
② 後台搜尋「Ninox – Integration for WooCommerce」→ 直接安裝(推薦)
原文外掛簡介
Ninox – Integration for WooCommerce adds a new REST API endpoint to WooCommerce that returns all products with their complete variation data in a single, optimized request.
This plugin is designed for developers, theme creators, and anyone building custom interfaces or integrations with WooCommerce who needs comprehensive product data including variations.
Key Features
Comprehensive Data Access: Get complete product details and all variations in a single API call
Performance Optimized: Batch processing and efficient queries to handle large product catalogs
Secure Authentication: Supports WooCommerce API key authentication and proper permission validation
Well-documented API: Clear documentation with example requests and responses
Cache Support: Intelligent caching to improve response times and reduce server load
Use Cases
Building custom front-end interfaces for WooCommerce stores
Developing mobile applications that need to display product data
Creating external integrations with other systems
Developing custom reporting tools
Any application that needs detailed product variation data
Technical Details
The plugin adds the following endpoint:
/wp-json/wc/v3/products-with-variations
This endpoint handles all the complex database queries needed to retrieve products with their attributes and variations in an efficient way, reducing the number of API calls your application needs to make.
API Documentation
The plugin adds the following endpoint:
Endpoint: /wp-json/wc/v3/products-with-variations
Method: GET
Required Permissions: manage_woocommerce capability or valid API key
Parameters:
Parameter
Type
Description
page
integer
Current page of the collection. Default is 1.
per_page
integer
Maximum number of items to be returned in result set. Default is 10. Max 20.
force_refresh
string
Set to ‘true’ to bypass cache and get fresh data. Optional.
Example Response:
`json
[
{
“id”: 123,
“name”: “Sample Product”,
“description”: “Product description”,
“short_description”: “Short description”,
“image”: “https://example.com/wp-content/uploads/sample-product.jpg”,
“sku”: “SAMPLE-1”,
“price”: “29.99”,
“regular_price”: “39.99”,
“sale_price”: “29.99”,
“stock”: 10,
“stock_status”: “instock”,
“weight”: “”,
“length”: “”,
“width”: “”,
“height”: “”,
“attributes”: [
{
“id”: 1,
“name”: “Size”,
“options”: [“S”, “M”, “L”]
}
],
“variations”: [
{
“id”: 124,
“sku”: “SAMPLE-1-S”,
“price”: “29.99”,
“regular_price”: “29.99”,
“sale_price”: “”,
“stock”: 5,
“stock_status”: “instock”,
“attributes”: [
{
“id”: 1,
“name”: “size”,
“option”: “S”
}
]
}
]
}
]
`
Headers:
When using pagination, the response includes the following headers:
X-WP-Total: The total number of products found
X-WP-TotalPages: The total number of pages
Status Endpoint
Endpoint: /wp-json/wc/v3/ninox-status
Method: GET
Required Permissions: manage_woocommerce capability or valid API key
Returns the plugin version and general environment data. A 200 response confirms the plugin is installed, active and reachable.
Example response:
`json
{
“plugin”: “ninox-integration-for-woocommerce”,
“plugin_name”: “Ninox – Integration for WooCommerce”,
“plugin_version”: “1.0.6”,
“wc_version”: “9.3.1”,
“wp_version”: “6.7”,
“php_version”: “8.1.0”,
“site_url”: “https://example.com”,
“wc_active”: true
}
`
Privacy Policy
This plugin does not collect, store, or share any user data. It only retrieves product information from your WordPress database through WooCommerce’s API.
No personal information is collected or transmitted to external services. The plugin only accesses the following database information:
– Product details
– Product variations
– Product attributes
– Stock information
All data processing occurs locally within your WordPress installation.
Security
This plugin supports two authentication methods for accessing the REST API endpoint:
WooCommerce API Keys (Basic Authentication)
– Create an API key pair in WooCommerce > Settings > Advanced > REST API
– Use these credentials in the Authorization header as Basic auth
– Format: Authorization: Basic base64(consumer_key:consumer_secret)
WordPress User Authentication
– Users must have ‘manage_woocommerce’ capability
– Supports standard WordPress authentication methods including:
* Session-based authentication
* Cookie-based authentication
* WordPress nonces
All credentials and API keys are stored securely in the WordPress database using WordPress core security standards. No credentials are stored in plain text, and all database queries are properly prepared and sanitized.
Support
If you need help with this plugin, please visit our support forum at:
https://ninoxnet.com/contacto/
For custom development or integration assistance, please contact us at:
[email protected]
