2017 © Pedro Peláez
 

library woo-bundle

Talking to the WC REST API with Symfony2

image

nav/woo-bundle

Talking to the WC REST API with Symfony2

  • Friday, September 23, 2016
  • by NavAppaiya
  • Repository
  • 3 Watchers
  • 2 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

WooCommerce REST API V2 Bundle

September 2016 Nav Note: This bundle is currently not maintained or used, so please use this bundle on your own risk., (*1)

Gives you a WC_CLIENT to work with the REST API V2 of your woocommerce webshop., (*2)

Please note that you will need a API_KEY and API_SECRET in order to use this bundle. Also don't forget to enable the pretty Permalinks for the WC-API endpoints to work., (*3)

About

  • WooCommerce REST API v2 Bundle for in your Symfony2 Projects.
  • Uses WooCommerce REST API PHP Client Library WooCommerce-REST-API-Client-Library
  • Easy to install and just easy to use.
  • For now it just gives you a service container with the WC-Client from the original WooCommerceRestAPI Library.
  • Will be adding more usefull stuff soon.

Installation

  1. Go to your symfony application and do: composer require nav/woo-bundle dev-master
  2. Enable the bundle in your app/AppKernel file new \Nav\WooBundle\NavWooBundle()

And finally Configure the parameters for your WC-Shop in config:, (*4)

parameters:
        woo_shop:   http://wp-shop.nl/
        woo_key:    API_KEY
        woo_secret: API_SECRET

Usage

Use it as a service by calling:, (*5)

$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'))

For more examples and usage please see the examples given in WooBundle/Client/example/example.php, (*6)

Credits original library: Copyright (c) 2013-2014 - Gerhard Potgieter, Max Rice and other contributors https://github.com/kloon/WooCommerce-REST-API-Client-Library, (*7)

The Versions

23/09 2016

dev-master

9999999-dev

Talking to the WC REST API with Symfony2

  Sources   Download

The Requires

 

by Nav Appaiya