Table of contents

Initial setup

This article describes the initial setup of the WooCommerce connector.


Step 1: Set up the environment variables

  • Navigate to “Settings” in the menu and select “Environment variables”.

  • Create a new environment variable for the domain URL
    1. Insert a name in the “name” field.
      • For example: “WOOCOMMERCE_DOMAIN_URL”.
    2. Insert the URL of the homepage of the WordPress website in the “value” field, including http:// or https://, without any trailing “/”. 
  • Create a new environment variable for the API URL
    1. Insert a name in the “name” field.
      • For example: “WOOCOMMERCE_API_URL”
    2. Insert the value “/wp-json/wc/v3/” in the “value” field.
  • Create a new API key in WooCommerce with Read/Write permissions.

  • After you click the generate key button you’ll get a Consumer key and a Consumer secret. Keep this tab open since we’re going to use this information.
  • Create a new environment variable for the Consumer key
    1. Insert a name in the “name” field. 
      • For example: “WOOCOMMERCE_CONSUMER_KEY”
    2. Insert the Consumer key in the “value” field.
  • Create a new environment variable for the Consumer secret
    1. Insert a name in the “name” field.
      • For example: “WOOCOMMERCE_CONSUMER_SECRET”
    2. Thick the “encrypted” box. This prevents anyone to view the secret key.
    3. Insert Consumer secret in the “value” field. 

Step 2: Create an HTTP client

  • Navigate to Clients in the menu and select HTTP Clients
  • Create a new HTTP Client to setup the connection with your shop.
  • Insert a name in the “name” field.
    1. For example: “Your Shop Name”
  • Under “Settings”, select the option “WooCommerce Client”.
  • Under “Webshop URL”, paste the environment variables for the Domain URL and the API URLthat you created earlier in this step. Make sure to paste both variables right after each other.
    1. For example: “${WOOCOMMERCE_DOMAIN_URL}${WOOCOMMERCE_API_URL}”
  • Under “Consumer key” past the environment variable consumer key.
    1. For example: “${WOOCOMMERCE_CONSUMER_KEY}”
  • Under “Consumer secret” past the environment variable consumer secret.
    1. For example: “${WOOCOMMERCE_CONSUMER_ SECRET}”

  • Save your HTTP client.

 

Additional information

Although out of the scope of this guide, make sure to check if there are any advanced settings required for your integration, like specific SSL settings. When that is the case, select “Default prototype” in the “Client” field and apply the required additional settings.

 

That's it! 

You are now ready to start configuring your WooCommerce integration in your Alumio environment.