• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

woocommerce/woocommerce-rest-api: This is the WooCommerce core REST API Package. ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

woocommerce/woocommerce-rest-api

开源软件地址:

https://github.com/woocommerce/woocommerce-rest-api

开源编程语言:

PHP 99.7%

开源软件介绍:

(Deprecated) WooCommerce REST API

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap