WooCommerce – REST API and Webhook settings

The next step in setting up WooCommerce is to set up REST API and Webhook. For these settings, select WooCommerce ›Settings› Advanced in the WordPress administration.

WooCommerce - nastavenie REST API a Webhook

REST API settings in WooCommerce

Let’s start by setting up the REST API. The Application Programming Interface (API) allows you to access data from multiple platforms and provide data to other users .

You must first generate a key to use the API. This key is required to secure access to the information being transmitted. A typical example is orders, to which only specific users should have access and should not be publicly available.

WooCommerce adding REST API

To set up a new API, click on the REST API link at the top of the page . You can add a new key here. Click Add Key to create it. The following key API window will open:

WooCommerce API key details
API key details

Here are a few lines:

Description – enter the name of the key in this line.
User – The user is a preconfigured site administrator. You can add more users here.
Permissions – after clicking on the arrow at the end of the window, you can choose from three permission options: read, write, read / write.

WooCommerce vygenerovaný API kľúč
Generated API key

Click Generate API key to generate your information access key . A window with your access keys will then open. Copy the keys. After launching the page, they will remain hidden. You will also find a key cancellation link at the bottom of the page.

Older APIs

To enable legacy APIs, click the Legacy API link at the top of the page. You’ll be taken to a page where you can click the checkbox to enable legacy REST APIs.

WooCommerce older API
Enabling older APIs

Webhook settings in WooCommerce

The penultimate link from WooCommerce ‘s advanced settings is Webhook . Webhook is the url to which a call is automatically initiated for a certain action, which ensures that the value of this action is sent. This allows you to connect third-party applications in WooCommerce.

WooCommerce pridanie Webhook
Adding Webhook

To add a webhook, click the Add Webhook button. A page will open where you can fill in the required data and settings. After filling in all the fields, click on Save webhook .

For more information, see the official documentation: docs.woocommerce.com

Was this article helpful for you? Support me by sharing, please. 👍
WordPress Návod v PDF


Please enter your comment!
Please enter your name here