Very simple Angular2+ wrapper for the WooCommerce API
Branch: master
Clone or download
Michael Doye Michael Doye
Michael Doye and Michael Doye rm
Latest commit 66b618b Apr 22, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
src first commit Apr 21, 2017
.gitignore first commit Apr 21, 2017
.npmignore first commit Apr 21, 2017
.travis.yml first commit Apr 21, 2017
.yo-rc.json rename Apr 21, 2017
README.MD rm Apr 22, 2017
index.ts update Apr 22, 2017
package.json 0.1.7 Apr 22, 2017
tsconfig.json first commit Apr 21, 2017
tslint.json first commit Apr 21, 2017



Very simple Angular2+ wrapper for the WooCommerce API

GitHub version dependencies Status GitHub issues Discord Chat


Import ng2woo in any Angular application by running:

$ npm install --save ng2woo

Install the WooCommerce API:

$ npm install --save woocommerce-api

You will need to get the WooCommerce credentials from your WooCommerce website.

Then from your Angular AppModule:

// Import ng2woo
import { WooApiModule, WooApiService } from 'ng2woo';

// Add your WooCommerce Credentials
const WooCommerceConfig = {
  url: 'your_site_url',
  wpAPI: true,
  version: 'wc/v1'

  declarations: [ ... ],
  imports: [
    // Specify as an import and pass in your config
  // Add the Api service
  providers: [ WooApiService ]
export class AppModule { }

Once ng2woo is imported, you can use the WooApiService in your components/services:

import { Component, OnInit } from '@angular/core';
// Import the service
import { WooApiService } from 'ng2woo';

export class HomePage implements OnInit { 

  products: any;
  // Inject the service
  constructor(private woo: WooApiService) { }

  ngOnInit(): void {
    // Fetch all products
      .then(products => console.log(products));




  • Accepts: string (required) - the type of WooCommerce item you want to fetch (products, orders, customers, categories). Accepts query parameters, see the WooCommerce Api docs for a full list of query parameters.
  • Returns: Promise


  .then(products => console.log(products))
  .catch(error => console.log(error));


To generate all *.js, * and *.d.ts files:

$ npm run tsc

To lint all *.ts files:

$ npm run lint


MIT © Michael Doye