kloon / WooCommerce-REST-API-Client-Library

A PHP wrapper for the WooCommerce REST API
GNU General Public License v3.0
356 stars 175 forks source link

uncaught in promise error consumer key is required error.consumerKey is required at new Woocommerce API(localhost:8100/build/vendor.js #250

Open xclusivzik opened 6 years ago

xclusivzik commented 6 years ago

image

xclusivzik commented 6 years ago

i keep having this issue when i try my woocommerce api with this code form my Home.ts import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import * as WC from 'woocommerce-api';

@Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage { Woocommerce :any; products:any[];

constructor(public navCtrl: NavController) { this.Woocommerce = WC({ url:'', Consumerkey:'', ConsumerSecret:''

});
  this.Woocommerce.getAsyn("products").then((data) =>{
    console.log(JSON.parse(data.body));
    this.products = JSON.parse(data.body).products;
  }, (err)=>{
    console.log(err)

  })

}

}

mariadebawi commented 5 years ago

same here