Connect your WooCommerce store to your AI Chatbot for dynamic responses like product recommendations, order tracking, and refunds. Simply import this template and take your WooCommerce store to next level.
2. Get Your WooCommerce Credentials
To connect your app or chatbot to WooCommerce, you’ll need these:
WOOCOMMERCE_CONSUMER_KEY – A unique key that allows access to the WooCommerce REST API with specified permissions.
WOOCOMMERCE_CONSUMER_SECRET – A secret key paired with the consumer key for secure API access.
To get the WOOCOMMERCE_CONSUMER_KEY and WOOCOMMERCE_CONSUMER_SECRET, follow these steps:
Step 1: Log in to Your WordPress Admin Dashboard.
Open your browser and go to your WordPress admin URL (for example, http://mystore/wp-admin).
Step 2: Install WooCommerce (if not already installed)
Go to Plugins → Add New in your WordPress dashboard.
Search for "WooCommerce", click Install Now, then Activate.
Step 3: Navigate to WooCommerce Settings
In the left-hand sidebar, click on WooCommerce.
Then click on Settings from the submenu.
Step 4: Go to the Advanced Settings
In the WooCommerce Settings, click on the Advanced tab at the top.
Under the Advanced tab, click on REST API.
Step 5: Create a New API Key
Click on the Add Key button.
You will see a form that asks for the following details:
Description: Enter a description (e.g., "My API Key for external app").
User: Choose the user for which you want to generate the key (preferably an Administrator account).
Permissions: Select Read/Write (or Read if you only need to retrieve data).
Click on the Generate API Key button.
Step 6: Copy Your API Keys
After generating the API key, you will see two new fields:
Consumer Key
Consumer Secret
Copy both keys and save them securely.
Step 7: Use Your API Credentials
WOOCOMMERCE_CONSUMER_KEY: Use the copied Consumer Key.
WOOCOMMERCE_CONSUMER_SECRET: Use the copied Consumer Secret.
E_COMMERCE_NAME – The name of your WooCommerce store (e.g., "My Store").
To get the E_COMMERCE_NAME, follow these steps:
General Settings: Navigate to Settings → General.
Edit Site Title: Update the Site Title field to your desired store name (the title is your E_COMMERCE_NAME).
WOOCOMMERCE_STORE_URL – This is the web address where your WooCommerce store is accessible.
To get the WOOCOMMERCE_STORE_URL, follow these steps:
Log in: Open your WordPress admin at http://localhost/wordpress/wp-admin and log in.
General Settings: Go to Settings → General.
Locate URL Field: Look for the WordPress Address (URL) field; this is your WOOCOMMERCE_STORE_URL.