What is the woocommerce_items_in_cart cookie?
woocommerce_items_in_cart is an HTTP cookie automatically set by WooCommerce, the most widely used e-commerce plugin for WordPress. It appears in the visitor's browser as soon as a product is added to the cart on a site running WooCommerce.
It belongs to a set of technical WooCommerce cookies (alongside cart_hash and woocommerce_cart_hash, depending on version) used to maintain cart state throughout the browsing session.
What data it stores
The cookie does not store the actual cart contents, only an indicator (typically a boolean-like flag) that the visitor currently has at least one product in the cart. The exact product details (IDs, quantities, prices) are handled server-side, usually through an associated PHP session.
The value is sent to the store's own domain (not to third-party Automattic/WooCommerce servers) and is only read by that store's own scripts to decide whether to display the cart as empty or filled.
What it is used for
The cookie's purpose is purely functional: it lets the site know, on every page load, whether the user has items in the cart, without needing to re-query the database or session each time the cart icon is rendered.
For the store owner, this cookie is essential to a correctly functioning checkout flow — without it, the shopping cart indicator could not be shown reliably across pages.
Does it require consent?
Under CookieFix's classification, woocommerce_items_in_cart is a strictly necessary cookie. Since it is indispensable to the shopping cart function actively requested by the user (adding a product), it falls under the exemption in the ePrivacy Directive and Article 6 GDPR — no prior consent from the visitor is required.
The site owner is nonetheless required to list it in the cookie policy, with its purpose and duration, for transparency toward users and to meet data protection authority expectations (such as Romania's ANSPDCP, for sites targeting Romanian users).
How to block or delete woocommerce_items_in_cart
A visitor can delete or block this cookie from browser settings (Chrome, Firefox, Edge, Safari all offer per-site cookie management). Blocking it may break the visible cart indicator, but it does not prevent browsing the site.
- Being strictly necessary, it should not be placed in a category that waits for consent in a CMP banner.
- A platform like CookieFix can still detect and correctly classify it during a scan and list it automatically in the cookie policy, without blocking it by default, since blocking strictly necessary cookies would break the cart functionality.
Frequently asked questions
It's a session cookie set by WooCommerce to remember that a visitor has products added to the shopping cart.
No, it is classified as strictly necessary because it directly supports the cart function the user requested, so it doesn't fall under the ePrivacy/GDPR consent requirement.
The cart may stop displaying correctly as having items, and the site could treat the session as having an empty cart until the next interaction.
Yes, even though it doesn't require consent, the site owner should list it in the cookie policy along with its purpose and duration.