ollywarren/larawoo 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ollywarren/larawoo

Composer 安装命令:

composer require ollywarren/larawoo

包简介

Provide a simple elegant wrapper around the Woocommerce APi Library from Automattic.

README 文档

README

Total Downloads Latest Stable Version License

A Simple and Elegant Wrapper fro the Automattic WooCommerce PHP Library.

Introduction

This project started after the need to integrate WooCommerce with a Clients backoffice system was identified. The idea was to create a small Laravel/Lumen service to run externally to WooCOmmerce that took the data from the back office system and fed it into WooCommerce across the REST API Endpoints. On the flip side we needed to also pass data back the other way. We felt that having WordPress handle this internally could be more complex than just using a Laravel API Data Service to handle this functionality.

Installation Laravel 5.5 +

Just use composer to drop this package in and let Auto Discover do its wonderful thing!

composer require ollywarren/larawoo

Publish the vendor configuration:

php artisan vendor:publish (Select the relevant package from the list)

Set the environment variables in your Apps .env file:

LARAWOO_URL="<YOUR WOOCOMMERCE INSTALL URL>"
LARAWOO_CONSUMER_KEY="<YOUR CONSUMER KEY>"
LARAWOO_CONSUMER_SECRET="<YOUR CONSUMER SECRET>"

Review the other avilable options in the documentation linked below and in the included larawoo configuration file.

Installation Laravel 5.4

Use composer to add it to your project dependencies:

composer require ollywarren/larawoo

Then inside your config/app.php

Add the package service provider to the providers array:

Ollywarren\Larawoo\LaraWooServiceProvider::class,

Add the facade to the alias array:

[
    'Larawoo' => 'Ollywarren\Larawoo\Facades\Larawoo::class'
]

Finally for good measure dump the composer autoloader to make sure we've pulled in the helper method:

composer dump-autoloader

Publish the vendor configuration:

php artisan vendor:publish

Set the environment variables in your Apps .env file:

LARAWOO_URL="<YOUR WOOCOMMERCE INSTALL URL>"
LARAWOO_CONSUMER_KEY="<YOUR CONSUMER KEY>"
LARAWOO_CONSUMER_SECRET="<YOUR CONSUMER SECRET>"

Usage Instructions

The included helper method makes accessing the underlying methods as easy as:

$results = larawoo()->get('customers');
// ['customers' => [[ 'id' => 8, 'created_at' => '2015-05-06T17:43:51Z', 'email' => ...

Or With the Facade if youd prefer

$results = Larawoo::get('customers');
// ['customers' => [[ 'id' => 8, 'created_at' => '2015-05-06T17:43:51Z', 'email' => ...

For a full breakdown of the available methods please see Automattic's Package Page for the library:

WooCommerce API Library Packagist Package

WooCommerce API Documentation

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固