I'm having trouble retreiving products from wooCommerce store


#1

Hi guys, I am trying to build an ecommerce mobile app wiith ionic 3 and woocommerce.
what i’m trying to accomplish now is , displaying products on home page.
So I imorted the woocommerce api with

import * as WC from 'woocommerce-api';

and then inside the constructor of the class of the homePage i wrote the following :

export class HomePage {
  WooCommerce:any;
  constructor(public navCtrl: NavController) {
this.WooCommerce=WC({
  url:"https://jammingStore.000webhostapp.com",
  consumerKey:"ck_8d8d8d8d8d8d8d8d8d8d8d8d",
  consumerSecret:"cs_8d8d8d8d8d8d8d8d8d8d8d8"

});
this.WooCommerce.getAsync("products").then((data)=>{
  console.log(data);
},(err)=>{
  console.log(err)
});

but this is the error i’m getting

polyfills.js:3
OPTIONS https://jammingstore.000webhostapp.com/wc-api/v3/products net::ERR_SSL_VERSION_INTERFERENCE

TypeError: Failed to fetch
at new HomePage (home.ts:19)
at createClass (core.js:12481)
at createDirectiveInstance (core.js:12326)
at createViewNodes (core.js:13784)
at createRootView (core.js:13673)
at callWithDebugContext (core.js:15098)
at Object.debugCreateRootView [as createRootView] (core.js:14381)
at ComponentFactory_.create (core.js:11278)
at ComponentFactoryBoundToModule.create (core.js:4030)
at NavControllerBase._viewInit (nav-controller-base.js:441)
at nav-controller-base.js:254
at t.invoke (polyfills.js:3)
at Object.onInvoke (core.js:4760)
at t.invoke (polyfills.js:3)
at r.run (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (core.js:4751)
at t.invokeTask (polyfills.js:3)
at r.runTask (polyfills.js:3)

can you guys please help me I’ve looked everywhere but to no avail, any help is greatly appreciated