1. First, go to your WordPress dashboard panel.

2. Then from the left menu, you can see the Woocommerce button, and click on it.

3. After that in the dropdown, you can see the Settings button, and click on it.

4. Now you have to click on the Advanced button from the menu bar.

5. After that, there is a REST API button, and click on it.

6. Now click on Add Key button.

7. Inside the Key Details, you have to fill in the required field and set Read/Write in the Permissions.

8. At last, now click on the Generate API Key button.

That's how you can get your Consumer Key and Consumer Secret.