WooCommerce 11.3 will let extensions identify cart items that belong to another cart item, addressing misleading “N in cart” counts for bundled products. The WooCommerce Developer Blog published the change on October 27, 2026. Here’s how the new filter works and which extension developers should review their cart behavior.
The short version: extensions that add child items on behalf of a parent product can pass the parent’s cart item key to WooCommerce. The Product Button block can then leave those child items out of its count. Sites that do not adopt the filter keep their current counting behavior, according to the advisory.
WordPress news: what WooCommerce 11.3 changes
The October 27 advisory describes a case familiar to developers of bundles and composite products: a shopper adds one parent product, and an extension adds related products to the cart. Until now, the Product Button for one of those related products could show “1 in cart,” even though the shopper had not added that product on its own.
WooCommerce cannot infer that relationship from the cart items alone. The extension that creates the child item must declare which parent it belongs to. In 11.3, developers can do that with the `woocommerce_store_api_cart_item_parent_item_key` filter. Store API cart items also gain a read-only `parent_item_key` field, which is a string or `null` by default.
For now, the Product Button block is the only feature that uses `parent_item_key`. The advisory says other blocks could use the relationship later. It gives the Cart and Mini-Cart blocks as examples of places where child items might eventually appear indented under their parent, but describes that as a possible future use, not a current feature.
Which WooCommerce extensions should use the filter?
Review an extension if it adds a cart item on behalf of another item. The advisory names bundles, composite products, mix-and-match products, force sells, chained products and “frequently bought together” features as examples.
A quick check is to add the parent product to a cart and inspect the Product Button for a product it added. If that button says “1 in cart,” the extension should consider declaring the parent relationship. An extension that adds a free gift or upsell tied to another item can choose whether to declare it, since that count may be accurate for its use case.
This is an accuracy change, not a compatibility requirement in the advisory. WooCommerce says nothing breaks if an extension does not adopt the filter; child items continue to count as they do today. That means developers can assess the customer-facing behavior and plan an update rather than treating the advisory as an emergency fix.
How to declare a parent cart item
Save the parent’s cart item key in the child’s cart item data, then return that key from the filter. The key comes from `WC()->cart->add_to_cart()`. It is not the product ID, a distinction that matters when the same product can appear in multiple cart lines.
add_filter(
'woocommerce_store_api_cart_item_parent_item_key',
function ( $parent_item_key, $cart_item ) {
return $cart_item['_my_extension_parent_item_key'] ?? $parent_item_key;
},
10,
2
);
The example returns a stored parent key when the extension has one and otherwise preserves the incoming value. The advisory specifically cautions developers to return the existing `$parent_item_key` unchanged for other items. That helps avoid erasing a parent relationship another extension has declared.
There is no need to clear the saved key when the parent leaves the cart. WooCommerce returns `null` for `parent_item_key` when the parent is no longer present, and the child counts as a standalone item again. WooCommerce also returns `null` if the filter supplies a key that does not match an item in the cart or matches the child’s own key.
The advisory notes a separate count correction: when a product appears across multiple cart lines, the Product Button count adds those lines together. Previously, the hydrated button showed only the quantity from the first line. That behavior is part of the described 11.3 changes, alongside the parent-child relationship support.
What developers should check before updating
Extension developers should test a parent product that adds one or more child items, then compare the Product Button count with the products the shopper added directly. Include a case where the parent is removed, because the child becomes a standalone cart item in that situation. Also check that the filter preserves the incoming value when the current cart item has no parent key.
These checks follow the conditions in the advisory; the post does not list a mandatory migration deadline or say that existing extensions will stop working. If your extension does not create related cart items, the new filter may not require any change. If it does, decide whether the current “N in cart” display describes the shopper’s action accurately, then implement and test the relationship in WooCommerce 11.3.
FAQ
Does WooCommerce 11.3 require extensions to use the new filter?
No. The advisory says extensions can keep their current behavior if they do not adopt it. The filter is for extensions that need to identify child cart items.
Does the new field use a product ID?
No. The extension should return the parent’s cart item key, which WooCommerce returns from `WC()->cart->add_to_cart()`. The advisory explicitly distinguishes this key from a product ID.
What happens to a child item when its parent is removed?
Its `parent_item_key` becomes `null`, and WooCommerce counts it as a standalone item again. The advisory says developers do not need to clear the stored key themselves.
Next step: test your bundle, composite or related-product extension with WooCommerce 11.3 and confirm that its Product Button counts match the products shoppers actually added.