Overview
WooCommerce is the dominant open-source e-commerce plugin for WordPress, powering a significant share of online stores globally. The platform transforms WordPress installations into full-featured storefronts with product catalogs, shopping carts, and checkout flows. Because WooCommerce operates as a WordPress plugin rather than a standalone platform, its cookie and script behavior is heavily influenced by the specific extensions, payment gateways, and analytics integrations each merchant installs.
What This Script Does
WooCommerce's core scripts manage cart state, checkout form validation, product variation selectors, and AJAX-powered add-to-cart functionality. The platform sets several cookies for essential store operations: woocommerce_cart_hash stores a hash of cart contents for cache invalidation, woocommerce_items_in_cart indicates whether the cart contains products, and wp_woocommerce_session_* maintains the server-side session linking the visitor to their cart data (persists for 48 hours by default). These core cookies are essential for store functionality.
Analytics and Marketing Layer
Beyond core functionality, WooCommerce integrates with analytics and marketing tools through its extension ecosystem. The WooCommerce Analytics module tracks product views, add-to-cart events, and purchase funnels. Many stores also run WooCommerce-specific integrations for Google Analytics (via woocommerce-google-analytics-integration), Facebook Pixel, and other marketing platforms that set their own tracking cookies. These additional scripts are not part of WooCommerce core but are commonly bundled.
Consent & Compliance
WooCommerce scripts span functional and analytics categories. The core cart and checkout cookies are essential for e-commerce functionality — they enable the shopping experience that the visitor explicitly initiated. Under GDPR and the ePrivacy Directive, these functional cookies are exempt from consent requirements as they are strictly necessary for the service requested by the user. However, the analytics layer — conversion tracking, funnel analysis, and any integrated marketing pixels — requires consent. Under CCPA/CPRA, the purchase transaction data is generally covered under the transactional exemption, but analytics and marketing data collection must be disclosed and is subject to opt-out rights.
Should You Block This Without Consent?
Conditional. WooCommerce core cart and checkout scripts are essential for store operations and should not be blocked — doing so would break the shopping experience. However, the analytics tracking, conversion measurement, and any integrated marketing extensions should be blocked until consent is obtained. Site operators should separate WooCommerce's functional scripts from its analytics and marketing extensions in their consent configuration.
Is WooCommerce GDPR compliant?
WooCommerce typically loads functional and analytics trackers, which are not strictly necessary for your site to work. Under the GDPR and the ePrivacy Directive, non-essential cookies and trackers must stay blocked until a visitor gives clear opt-in consent. So WooCommerce can be fully GDPR compliant, but only if your site holds its scripts until consent is granted and lets visitors decline just as easily. Compliance depends on how your site loads WooCommerce, not on WooCommerce itself.
Consent Categories
Also Known As
Industries
Tracked Domains (1)
woocommerce.comFunctionalwoocommerce.com is a functional domain operated by WooCommerce, used to run site features like chat, video, embeds, and preferences.
Cookies WooCommerce Sets (4)
wp_woocommerce_session_EssentialWooCommerce cart session identifier. Anchors the shopping cart and checkout state to the visitor. Required for the cart and checkout flow to function. Suffix encodes the site auth hash.
woocommerce_items_in_cartEssentialWooCommerce cache-bypass flag set when the cart is non-empty so the WordPress page cache serves the live cart fragment rather than a cached HTML copy.
woocommerce_cart_hashEssentialWooCommerce cart-content hash for cart-page rendering.
woocommerce_recently_viewedWooCommerce recently-viewed products cookie. Stores the last few product IDs the shopper viewed so the shop can render a recently-viewed widget. Convenience feature, not required for checkout.
Frequently Asked Questions
Related Vendors
Manage consent for WooCommerce
ConsentStack automatically detects and manages WooCommerce trackers so your site stays compliant with global privacy regulations.