Store API Updates Coming in WooCommerce 9.8

The WooCommerce Store API offers a simple way to interact with your store’s products and the current cart and order data. While it is similar to the WC REST API, the Store API is built specifically to enable developers to include easy, non-authenticated client-side functionality, such as in a custom block or a headless WooCommerce store.

WooCommerce 9.8 includes a number of improvements to the Store API that are empowering changes in our core functionality and are ready to be leveraged by developers.

Store API Updates in 9.8

This is the first batch of improvements we’re bringing to the Store API with more to follow in the future. As of WooCommerce 9.8, the following updates will be available:

Batch in Store API: We enabled batching for all Store API endpoints, previously, batching was only enabled to select POST endpoints in Cart, it’s now available to all endpoints. To avoid overloading the server with massive requests, batching is opt-in via a filter:

add_filter( '__experimental_woocommerce_store_api_batch_request_methods', function( $methods ) {
    $methods[] = 'GET';
    return $methods;
}, 10, 1 );

Brands in Store API: With Brands being a core taxonomy, we have added them to Store API endpoints, including the products endpoint, you can also fetch all brands or individual brands via the products/brands or filter products by brand slug or id. For example: /products?brand=apple.

Modify Store API rate limit IP: The Store API ships with an IP rate limiter that’s opt-in. We heard your feedback in this post, and made the rate limiter filterable so you can slot in your own custom fingerprinting system instead of just using IPs via a new filter woocommerce_store_api_rate_limit_id:

add_filter( 'woocommerce_store_api_rate_limit_id', function() {
    $accept_language = isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) : '';
    
    return md5( wc_get_user_agent() . $accept_language );
} );

Expose Cart-Token header in CORS: Cart-Tokens are now exposed in CORS-protected requests, this allows you to build from the client directly without going via a proxy. This change only exposes the cart token and not the nonce.

New endpoint to update a draft order: Store API has a new endpoint PUT /checkout that allows you to update the current order in real time, so you can persist all fields in Checkout (not just address fields), including additional fields, select a payment method, and the order note as well. The endpoint can be called with checkout?__experimental_calc_totals=true to recalculate totals and return an updated cart with it.

How the Store API is helping stores today

Updates to the Store API are in part-driven by the new Cart and Checkout blocks with the goal of helping merchants see optimized conversion rates on their stores. As an example, WooCommerce 9.8 will include Persistent Additional Fields on Checkout, meaning refreshing the page won’t lose entered data.  

All additional fields and payment methods on the checkout block are now persisted to the order. This happens via a /PUT request to the wc/store/checkout endpoint as the user types.

For developers looking to increase compatibility with the checkout blocks, extra extensibility is possible, such as reacting to changes in checkout fields to offer users discounts, add taxes, etc. Use the woocommerce_store_api_checkout_update_order_from_request action to react to changes server-side. Check out this example.

Updates in Extensions

The following extensions are now compatible with the Store API and can be used for Cart and Checkout operations:

Product Bundles v8.3.0+ (Released January 14, 2025): You can add Product Bundles to cart via Store API.  One limitation with this integration is that currently, the bundle_id is not exposed in the Store API response. Instead, you can either  get it manually from the product page or via WC REST API from the bundled_items property. We’re working on improving this and an update will be released soon. See documentation.

Composite Products v10.3.0+ (Released January 14, 2025): You can also add Composite Products to cart via Store API . Similar to Product Bundles, the component_id is not exposed in the Store API response. Instead, you can either get it manually from the product page or via WC REST API from the composite_components property. See documentation.

Product Add-Ons v7.7.0+ (Released March 11, 2025): Product add-ons can be added to cart via Store API and exposed in cart responses. Similar to Product Bundles, the Add-On IDs are not exposed in the Store API response, and you need to get it either manually or via WC REST API from the addons property. See documentation.

Gift Cards v2.4.0+ (Released March 11, 2025): Gift cards can be configured and added to cart via the Store API. Moreover, they can be applied to the cart. See documentation.

To start using the Store API, check out the documentation. To see everything coming in WooCommerce 9.8 and track the release schedule, read the pre-release post.

Store API is now considered stable 

WooCommerce Store API Documentation 

Tutorial: Placing an order using the Store API


3 responses to “Store API Updates Coming in WooCommerce 9.8”

  1. Hi, any info on woocommerce 9.7.2?

    1. Brian Coords Avatar
      Brian Coords

      At this point, we haven’t announced plans for a WooCommerce 9.7.2. If that changes, we’ll post an update to the Developer Blog.

  2. I’m looking for ways to enhance my site.

Leave a Reply

Your email address will not be published. Required fields are marked *