KBAISE/ for lovable
Library
Docs

Connect your app to WooCommerce

about 10 minBuildingchecked 2d agoOfficial page
The short version

You can connect your Lovable app to your WooCommerce store to manage products, orders, customers, and reports. This lets you build custom tools like dashboards or inventory managers that interact directly with your store data.

Anyone building a Lovable app that needs to read or change information in a WooCommerce store needs this.

Do this, in order

  1. 1

    Sign in to your WordPress admin dashboard for your WooCommerce store.

    This is where you will get the special keys needed to connect your store to Lovable.

  2. 2

    Go to 'WooCommerce' then 'Settings', then 'Advanced', and finally 'REST API'.

    This is the specific section in WooCommerce where you create and manage API keys.

  3. 3

    Click 'Add key', give it a description (like 'Lovable integration'), and choose the WordPress user it belongs to.

    This creates a new set of credentials for Lovable to use, and the description helps you remember its purpose.

  4. 4

    Choose the permissions for the key: 'Read' if your app only needs to view data, or 'Read/Write' if it needs to change data like products or orders.

    This controls what your Lovable app will be allowed to do in your WooCommerce store for security and functionality.

  5. 5

    Click 'Generate API key', then immediately copy both the 'Consumer key' and 'Consumer secret'.

    These are the unique credentials your Lovable app will use to access your store, and the secret is only shown once.

  6. 6

    In Lovable, go to 'Connectors' and select 'WooCommerce'.

    This is where you will set up the connection using the keys you just copied.

  7. 7

    Click 'Add connection', then give it a display name (like 'WooCommerce Prod'), enter your store's full HTTPS URL, and paste the 'Consumer key' and 'Consumer secret'.

    This provides Lovable with all the necessary information to link to your specific WooCommerce store.

  8. 8

    Under 'Sharing', choose who can use this connection in your Lovable workspace, or keep it private to yourself.

    This determines which other people or projects in your Lovable workspace can use this WooCommerce connection.

  9. 9

    Click 'Connect'.

    This finalizes the connection, making your WooCommerce store accessible to your Lovable app based on the permissions you set.

Paste this into your project

Connect my Lovable app to my WooCommerce store. I need to be able to list and manage products, variations, categories, and inventory; read and update orders, refunds, coupons, and customer records; and build dashboards and internal tools. My store URL is https://store.example.com, and I have my Consumer key (starts with ck_) and Consumer secret (starts with cs_).

Words decoded

WooCommerce REST API
A set of rules and tools that lets different computer programs talk to your WooCommerce store and exchange information, like asking for a list of products or telling the store to update an order.
Consumer key and secret
These are like a username and password for your Lovable app to securely log in and interact with your WooCommerce store. The 'key' is like the username, and the 'secret' is like the password.
WordPress permalinks
This refers to the permanent web addresses (URLs) for pages and posts on your WordPress site. For the connection to work, they need to be set up in a way that allows the Lovable app to find the right 'doors' (API routes) to your store's data, not just 'plain' numbers.
HTTPS
A secure way for your web browser or app to communicate with a website, ensuring that information sent back and forth is encrypted and protected from being intercepted.

Where people get stuck

  • Not enabling HTTPS on your WooCommerce store will prevent the connection.
  • Using 'Plain' WordPress permalinks will cause the connection to fail.
  • Forgetting to copy the Consumer secret immediately after generation, as it's only shown once.
  • Choosing 'Read' permissions when your app needs to create or update data, which will limit its functionality.
  • Sharing your Consumer key and secret publicly, as they function like a password and should be kept secure.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.