定制 woocommerce/woocommerce-rest-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

woocommerce/woocommerce-rest-api

最新稳定版本:1.0.15

Composer 安装命令:

composer require woocommerce/woocommerce-rest-api

包简介

The WooCommerce core REST API.

README 文档

README

Notice: This plugin is now merged into WooCommerce core, all open issues and PRs will be eventually transfered to WooCommerce core Repo. Please submit all new issues or PRs directly to the core repo.

license Latest Stable Version Build Status Scrutinizer Code Quality

This repository is home to the WooCommerce REST API package.

The stable version of this package is bundled with WooCommerce core releases, but it can also be used as a standalone plugin so bleeding-edge API features can be tested or used by other feature plugins. We do not recommend using this repo as a standalone plugin in production.

Using this package as a plugin

After checking out the code to your wp-content/plugins directory, you'll need to run composer install in the plugin directory (wp-content/plugins/woocommerce-rest-api) to install dependencies and to enable the autoloader. Without performing this step, if you activate the plugin it will simply show an admin notice.

API documentation

Versions

Namespace Status Docs
wc/v4 Development Link
wc/v3 Stable Link
wc/v2 Deprecated - October 2020 Link
wc/v1 Deprecated - April 2019 Link

Note: API Versions are kept around for 2 years after being replaced, and may be removed in the next major version after that date passes.

Using this package in other projects

This package is hosted on Packagist and can be included using composer.json:

"require": { "woocommerce/woocommerce-rest-api": "1.0.0" },

Since multiple versions of this package may be included at the same time, it includes a special package-version autoloader. This dependency is also on Packagist:

 "automattic/jetpack-autoloader": "^1"

And using this autoloader requires the following include in your codebase:

$autoloader = __DIR__ . '/vendor/autoload_packages.php'; 

If you choose to use your own autoloader, please note you won't be able to determine which version of the package is running since it could use the version in WooCommerce core or your version. The namespaces would conflict. All of our feature plugins and packages use the package autoloader.

Contributing

Please read the WooCommerce contributor guidelines for more information how you can contribute to WooCommerce, and the REST API contribution documentation here.

Within this package, namespaces and endpoint classes are located within the src/RestAPI/ directory. If you need to change the behavior of an endpoint, you can do so in these classes.

Run tests using phpunit in the root of the package. All pull-requests must pass unit tests in order to be accepted.

Translation

For strings located in API endpoints, use woocommerce as your text-domain. These endpoints will be translated in the WooCommerce Core PO/MO files.

woocommerce/woocommerce-rest-api 适用场景与选型建议

woocommerce/woocommerce-rest-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 132.89k 次下载、GitHub Stars 达 44, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 woocommerce/woocommerce-rest-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 woocommerce/woocommerce-rest-api 我们能提供哪些服务?
定制开发 / 二次开发

基于 woocommerce/woocommerce-rest-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 132.89k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 44
  • 点击次数: 16
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 44
  • Watchers: 16
  • Forks: 35
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-01-04