Update 2023-12-01: The dedicated Legacy REST API extension is now available. See the announcement post.
Update 2023-10-27: This post has been extended to include information about legacy webhooks.
The details
WooCommerce 2.6, which was released back in 2016, included a new REST API based on the WordPress JSON API. That made the old (now referred to as “Legacy”) REST API obsolete, and we have documented it as being deprecated since then. In fact, it needs to be explicitly enabled from the admin area for it to be usable.
We have decided that the Legacy REST API will be removed from WooCommerce as of version WooCommerce 9.0, scheduled to be released in June 2024. However, we will offer a separate WooCommerce extension that will include all the removed code for sites that still need it.
For all practical purposes, having the new extension installed and activated in WooCommerce 9.0 and newer versions will be functionally equivalent to having the Legacy REST API enabled in WooCommerce 8.9 and older versions: nothing will change for clients of the API, and the same client keys will continue working.
Additionally, webhooks configured to use the Legacy REST API to compose their payloads (referred to as โlegacy webhooksโ in this post) will stop working starting with WooCommerce 9.0 unless the new extension is installed.
Why this change?
We are continuously working on improving the WooCommerce experience for both users and developers. As part of that, we sometimes need to do some cleanup. Removing the Legacy REST API โ whose usage we have been discouraging for the past few years โ will make the WooCommerce release package lighter and will hopefully also help make the WooCommerce REST API easier to understand.
How can I tell if this affects me?
This change affects you if at least one of the following is true (or you anticipate that it will be true by the time of the WooCommerce 9.0 release) for your site :
To check if the Legacy REST API is enabled, go to WooCommerce > Settings > Advanced > Legacy API. The “Enable the legacy REST API” box below being checked means that the Legacy REST API is enabled.
- You have legacy webhooks in your WooCommerce install.
To check if you have legacy webhooks in your store, go to WooCommerce > Settings > Advanced > Webhooks. Starting with WooCommerce 8.3 you will see a “Legacy” section with a count of how many of such webhooks exist in your site.
If you have WooCommerce 8.2 or an older version, you will need to check every webhook individually. Click on the webhook name to open its details page, a legacy webhook will have โLegacy API v3 (deprecated)โ as the value for the API Version setting.
If any of these applies to you, your site will need to have the new extension installed so that applications communicating with your site via the Legacy REST API aren’t affected, and legacy webhooks continue working. Ideally, this should happen before your server gets upgraded to WooCommerce 9.0 to avoid any disruptions.
WooCommerce 8.3 will also add dismissible warning notices in sites that either have the Legacy REST API enabled or have legacy webhooks.
What action should I take?
If you anticipate that you’ll still need to have the Legacy REST API enabled when WooCommerce 9.0 is released, the recommended action is to install the new extension as soon as it’s available. We will announce the availability of the new extension in this blog.
Can I install the upcoming extension before WC 9.0 is released?
It will be safe to install the new extension at any time before WooCommerce 9.0 is released. This is due to the fact that as long as the extension detects that the WooCommerce version currently running in your server still has the Legacy REST API in place, it won’t initialize itself as to not interfere with the built-in code.
Can I rely on the new extension to support the Legacy API forever?
Please note that the new extension will not be maintained indefinitely, so we would strongly encourage you to update any systems that rely on the Legacy API or on legacy webhooks and migrate to the current REST API instead. If you are using a third party product or service, consider contacting their team about this.
Tell us what you think
We are considering automatic installation of the new extension as part of the upgrade to WooCommerce 9.0 on sites that have the Legacy REST API enabled or have legacy webhooks, but that’s something we need to explore further. Comment on this post and let us know if this is something you feel would benefit you.
Leave a Reply