ederribeiro/wooapubundle

WooCommerce REST API 包

安装: 15

依赖项: 0

建议者: 0

安全性: 0

星标: 3

关注者: 2

分支: 0

开放性问题: 0

类型:symfony-bundle

1.0.2 2015-10-02 02:42 UTC

This package is not auto-updated.

Last update: 2024-09-28 18:37:06 UTC


README

WooCommerce REST API 包

安装

步骤 1: 下载包

$ composer require ederribeiro/wooapubundle "~1.*"

步骤 2: 启用包

在 'app/AppKernel.php' 文件中,你需要添加这一行

<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
        	// ...
            new Woo\ApuBundle\WooApuBundle(),
        );
    }
}
?>

步骤 2: 添加到 parameters.yml.dist

woo_apu.consumer_key: <your key>
woo_apu.consumer_secret: <your secret>
woo_apu.shop: <your shop address>

步骤 3: 使用 composer 更新

$ composer update

当请求密钥时,请输入来自 WooCommerce 控制面板的密钥。

使用方法

只需从 symfony 容器中获取客户端服务

<?php
class MyTest
{
	public function __construct(ContainerInterface $container)
    {
        $client = $container->get("wooapu.client");
        // and do your magic
    }
}
?>

许可证

MIT 许可证 Eder Ribeiro