DEV Community

GeorgeMurphy-1
GeorgeMurphy-1

Posted on • Updated on

Turning on REST API for WooCommerce

What's up, folks!

In this article, you'll discover how to activate the REST API for your WooCommerce site.

Ready to dive in? Let's roll:

  1. Head over to your WordPress Admin Dashboard.

  2. In order to access REST API end points you must change your permalinks style from plain to any other format.

  3. Navigate to WooCommerce -> Settings.

  4. Inside WooCommerce Settings, find the "Advanced" tab.

  5. In the "Legacy API" section, you'll come across an option labeled "Enable REST API." Don't check this box. This API is deprecated and not suitable for new projects. The WooCommerce Legacy REST API uses a different JSON format for request and response bodies compared to the modern WooCommerce REST API. It also relies on Basic Authentication instead of OAuth for security.

  6. Save Changes:
    Once you've made sure not to enable the deprecated REST API, scroll down to the bottom of the page and hit the "Save changes" button. This step activates the REST API for your WooCommerce site.

Voilà! You've successfully enabled the REST API for your WooCommerce site, opening the doors to communication with various applications like a React front-end or mobile apps for Android or iOS.

Don't forget to configure authentication and permissions for your API to ensure data security and control over its functionality.

Stay tuned for more WooCommerce wisdom!

-George Murphy

Top comments (0)