WooCommerce constructor

WooCommerce({
  1. required String baseUrl,
  2. required String consumerKey,
  3. required String consumerSecret,
  4. String apiPath = DEFAULT_WC_API_PATH,
  5. bool isDebug = false,
})

Implementation

WooCommerce({
  required String baseUrl,
  required String consumerKey,
  required String consumerSecret,
  String apiPath = DEFAULT_WC_API_PATH,
  bool isDebug = false,
}) {
  this.baseUrl = baseUrl;
  this.consumerKey = consumerKey;
  this.consumerSecret = consumerSecret;
  this.apiPath = apiPath;
  this.isDebug = isDebug;

  if (this.baseUrl.startsWith("https")) {
    this.isHttps = true;
  } else {
    this.isHttps = false;
  }
}