Back to Community

Troubleshooting Common CookieYes and WooCommerce Integration Issues

Content

Many WordPress users running WooCommerce stores rely on the 'CookieYes – Cookie Banner for Cookie Consent' plugin to help with GDPR and CCPA compliance. A frequent point of confusion and technical difficulty arises when integrating these two powerful plugins. Based on community reports, this guide covers the most common problems and their solutions.

Why Do These Conflicts Happen?

At its core, the conflict usually stems from how the CookieYes plugin manages script blocking. To enforce cookie consent rules, it must prevent certain scripts—including some from WooCommerce—from running until a user provides consent. If a WooCommerce cookie that is essential for basic site functionality (like managing a shopping cart) is incorrectly categorized as "Functional" or "Non-necessary," the plugin will block it, breaking key features of your store.

Most Common Issues and Their Solutions

1. Can't Add Products to Cart or Update Quantities

The Problem: Users cannot add items to their cart, or the cart page does not update when quantities are changed. This often occurs in incognito mode or before cookies are accepted.

The Solution: This is almost always caused by the blocking of essential WooCommerce session cookies.

  • Navigate to your CookieYes dashboard and go to Cookie Manager > Cookie List.
  • Find the key WooCommerce cookies. The most common culprits are:
    • woocommerce_cart_hash
    • woocommerce_items_in_cart
    • wp_woocommerce_session_* (the asterisk * denotes a dynamic suffix)
  • Edit these cookies and change their category from "Functional" to "Necessary".

Important Legal Note: Before moving any cookie to the "Necessary" category, you must verify that it does not store personal data without consent. Consult with a legal professional to ensure this change still keeps you compliant with regulations like GDPR and CCPA.

2. Checkout, PayPal, or Stripe Payment Buttons Are Missing

The Problem: Critical checkout elements, like payment gateway buttons (PayPal, Stripe), address fields, or the entire checkout process, fail to load or function correctly.

The Solution: The scripts that power these payment gateways are being blocked prior to consent.

  • Ensure you are not running duplicate CookieYes scripts. A common mistake is having both the WordPress plugin active and the CookieYes script installed separately via Google Tag Manager. This creates a conflict. Deactivate one of them.
  • If the buttons only appear after consent is given, this is often the intended behavior if they rely on tracking. If they are necessary for the basic function of your site, you may need to adjust their script blocking settings.

3. Product Images or Galleries Not Displaying

The Problem: Product images, galleries, or variation swatches do not appear on product pages until after cookies are accepted.

The Solution: A theme or WooCommerce cookie responsible for this functionality is being blocked.

  • Check your cookie list for cookies related to your theme (e.g., woodmart_wishlist_count for Woodmart) or WooCommerce.
  • Move any cookie controlling this visual functionality to the "Necessary" category, following the same legal precautions mentioned above.

4. WooCommerce Cookies Not Detected in Scan

The Problem: The automatic cookie scanner does not find WooCommerce cookies, so you cannot manage them.

The Solution: This is normal behavior for many session-based cookies, as they are only created when a user performs a specific action like adding to a cart.

  • You must manually add these cookies. In your CookieYes dashboard, use the "Add New" button in the Cookie List to create entries for the common WooCommerce cookies listed in section 1.

5. JavaScript Errors in Console

The Problem: Errors like TypeError: document.getElementById(...) is null or Uncaught RangeError: Maximum call stack size exceeded appear in the browser's console, breaking site functionality.

The Solution: These can be trickier to diagnose but are often related to script loading order or conflicts.

  • First, try temporarily disabling the "Advanced script rendering" option in the CookieYes settings to see if it resolves the conflict.
  • Ensure all your plugins and themes are updated to their latest versions.

General Best Practices

  • Test Thoroughly: Always test your site's core functionality (browsing products, adding to cart, checking out) in an incognito/private browser window to simulate a new user's experience before consent is given.
  • Manual Configuration: Don't rely solely on the automatic scanner. Manually review and categorize all cookies related to your site's essential functions.
  • Avoid Duplication: Use either the WordPress plugin or a Google Tag Manager installation, not both simultaneously, to prevent conflicts.

By understanding how cookie consent management interacts with WooCommerce's operations, you can effectively troubleshoot these common issues and create a compliant, functional online store.

Related Support Threads Support