Skip to content

Use WooCommerce to sell from your WordPress store in your app: show its products, create orders and customers, and move orders through their statuses. To connect, you need your store’s address and a REST API key from your store’s admin.

Connect WooCommerce

Only a project owner can connect WooCommerce. To connect it, first create a REST API key in your store’s admin under WooCommerce › Settings › Advanced › REST API › Add key. Choose a shop manager as the user and Read/Write as the permissions, and then click Generate API key. Copy the consumer key, which starts with ck_, and the consumer secret, which starts with cs_. WooCommerce shows the secret only once.

  1. Open Project Settings › Connections, and then turn on the switch for WooCommerce.
  2. In the Connect WooCommerce dialog, enter your store’s public HTTPS address in Store address, such as https://shop.example.com. If your store is under a path, include the path. To open WooCommerce’s help on REST API keys, click Find it beside the label.
  3. Paste the key into Consumer key and the secret into Consumer secret.
  4. Click Connect.

For more information about connecting a service, see Connect a service.

What to ask

With WooCommerce connected, your app can list and search your products, with their prices, stock, and variations. It can list and read orders, create orders for a customer or a guest, and change an order’s status. It can also create customers and find them by email or name. Ask the agent for the screen or feature that you want, and say which products or orders it uses.

Example request

Add a Shop screen that lists the products on sale in my WooCommerce store, with each one’s picture, price, and whether it’s in stock.

Example request

When a customer checks out, create a WooCommerce order for the items in their cart, and then send them to the store’s payment page to pay for it.

Example request

Add an Orders screen that lists my store’s processing orders, with a button that marks an order completed.

An order that your app creates uses your store’s prices, and the customer pays for it on your store’s own payment page. For an order that’s paid some other way, your app can record it as paid. The store then moves it to processing, reduces the stock, and emails the customer. Changing an order’s status and creating a customer also send the store’s usual emails.

Agent questions

If WooCommerce isn’t connected, the agent asks you to connect it in a card above the message box. See Connect when the agent asks.

Review

After the agent finishes, read the turn’s Summary and review its Changes. Check the affected screens in Screens, and try the change in Preview. If the change uses records or sign-in, test it with the thread’s own data in Data.

After you push a backend change, check the result in Backend.

An order that you create while testing is a real order in your store, and the store emails the order’s billing address. Test with an email address that you own. After you finish, cancel your test orders, which puts their stock back.

Push

When the feature works, push the changes to your app.

Next steps

Troubleshooting

  • The dialog says the key is Read only: create a key with Read/Write permissions in WooCommerce › Settings › Advanced › REST API, and then paste the new key and secret.
  • The dialog says the store answered with a web page: in WordPress, set Settings › Permalinks to any option except Plain, and check that no security plugin blocks /wp-json/.
  • For a key that’s refused, see A service refuses your key. For a message about the service in your app, see Messages shown in your app.