nav / woo-bundle
此包的最新版本(dev-master)没有可用的许可信息。
使用 Symfony2 与 WC REST API 通信
dev-master
2016-09-23 14:44 UTC
Requires
- afurculita/woocommerce-api-client: 0.3.*@dev
This package is not auto-updated.
Last update: 2024-09-25 15:35:19 UTC
README
2016年9月 Nav 注记: 此包目前未维护或使用,因此请在自己的风险下使用此包。
为您的 woocommerce 网上商店的 REST API V2 提供一个 WC_CLIENT 来进行工作。
请注意,您将需要 API_KEY 和 API_SECRET 才能使用此包。同时,不要忘记启用 WC-API 端点的漂亮永久链接。
关于
- 适用于您的 Symfony2 项目的 WooCommerce REST API v2 包。
- 使用 WooCommerce REST API PHP 客户端库 WooCommerce-REST-API-Client-Library
- 易于安装和使用。
- 目前它仅提供了一个服务容器,其中包含来自原始 WooCommerceRestAPI 库的 WC-Client。
- 将很快添加更多有用功能。
安装
- 转到您的 symfony 应用程序,然后执行:composer require nav/woo-bundle dev-master
- 在您的 app/AppKernel 文件中启用此包 new \Nav\WooBundle\NavWooBundle()
最后,在 config 中配置您的 WC-Shop 参数
parameters:
woo_shop: http://wp-shop.nl/
woo_key: API_KEY
woo_secret: API_SECRET
使用方法
通过调用服务使用它
$client = $this->get('nav_woo.client');
$client->orders->get();
$client->orders->update_status($order_id, 'pending')
$client->customers->delete($customer_id);
$client->customers->get_orders($customer_id)
$client->products->get_count();
$client->products->get_count(array('type'=>'simple'))
有关更多示例和用法,请参阅 WooBundle/Client/example/example.php 中的示例
原创库致谢:版权所有(c)2013-2014 - Gerhard Potgieter,Max Rice 以及其他贡献者 https://github.com/kloon/WooCommerce-REST-API-Client-Library