How to Add a Cookie Policy to WooCommerce

Last updated on October 19, 2026

Overview

This guide will walk you through how you can generate and add a cookie policy page on your WooCommerce website. A cookie policy is a document that provides detailed disclosure about the types of cookies used on a website and their purposes. It can help your website meet transparency requirements under privacy laws such as the GDPR and the ePrivacy Directive.

Prerequisites

  • A CookieYes account (if you don't have one, sign up for free).
  • Admin access to your WooCommerce website.

Note

After you sign up, you will be directed to the installation screens. You can install the cookie banner to support GDPR compliant for your use of cookies. If you prefer to create a cookie policy first, skip the installation and go directly to the CookieYes Dashboard.

You can access the cookie policy generator in two ways:

  1. Log in to your CookieYes account.
  2. From the top navigation bar, select Legal Policies.
  3. From the Cookie Policy section, click + Generate.legal_policies_dashboard.png

Note

To install and set up the CookieYes plugin on WordPress, refer to this guide.

  1. Log in to your WordPress admin portal.
  2. Navigate to CookieYes.

If your plugin is already connected to CookieYes web app.

  1. Click Go to Web App.wp-webapp-connect.png
  2. In the CookieYes web app dashboard, select Legal Policies, and click + Generate under Cookie Policy.

If your plugin is not connected to CookieYes web app:

  1. Go to CookieYes > Policy Generators > Connect to Web App to Generate.wp-cpg-generate.png
  2. Click Have an account? Log in and connect.wp-webapp-login.png
  3. Enter your email and password.
  4. Click Log In & Connect Site to CookieYes.

Once connected, select Legal Policies, and click + Generate under Cookie Policy from the CookieYes web app dashboard.

legal policies dashboard

Step 2: Configure language settings

  • Select your primary language. The chosen language will appear with a checkmark.
  • (Optional) Enable Generate policy in multiple languages to add more languages. This feature is available on Basic, Pro and Ultimate plans.
  • Click Save draft to save your progress or Next to continue.
webapp languages

Step 3: Add about cookies details

In the About cookies section, edit the heading and description to explain what cookies are and why your website uses them. You can keep the default text or edit it to match your website’s practices.

webapp cookies

Step 4: Add use of cookies details

In the Use of cookies section, describe how your website uses cookies (for example, functionality, analytics, performance, or advertising). You can keep the default text or update it for accuracy.

When ready, click Preview cookie policy to review the formatting and tone before proceeding.

webapp cookies use

Step 5: Review and edit types of cookies

In the Types of cookies section, you will see a list of cookies from your most recent website scan. If needed, you can refresh the list by clicking Scan again to capture any new cookies. The cookies are organised into categories such as Necessary, Functional, Analytics, Performance and Advertisement. Review each entry carefully to verify the cookie name, duration, and purpose for accuracy.

Type of cookies

In the Cookie preferences section, keep the default heading (“Manage cookie preferences”) and description, or update them with instructions specific to your users. Set the Effective Date for the cookie policy. Preview the policy to verify the details and when confirmed, click Generate cookie policy to generate the policy.

webapp cookie preference

Note

The Revisit consent widget enables your website visitors to manage their cookie preferences. You can remove the code in the field if you don’t want a widget to be displayed. For more details, refer to the guide.

After generating your cookie policy, review the preview in your selected language(s).

review-in-diff-lang.png

Click Add policy to site to open a modal with ways to add your cookie policy.

add policy to site

Adds the cookie policy using your existing cookie banner script. The published policy updates automatically whenever you make changes in CookieYes.

Step 1: Select One-click install

In the modal, select One-click install.

Step 2: Create a policy page in WooCommerce

  1. Log in to your WordPress admin dashboard.
  2. In the left-hand menu, go to Pages > Add Page.add-page-wc.png
  3. Enter the title Cookie Policy, then click Save draft.
  4. Copy the URL of the cookie policy page and paste it into the CookieYes web app.page-url-cookie-policy.png

Step 3: Embed the policy code

1. In the top-right corner of the page editor, click the Options (⋮) icon, then select Code editor.

code-editor-wc.png

2. Paste <div id="cky-auto-cookie-policy"></div> into the code field.

paste-code-wc.png

3. Click Publish.

click-publish-wc.png

Step 4: Publish and verify

1. Return to the CookieYes web app.

2. Click Publish cookie policy.

publish-policy.png

3. Open the live cookie policy page on your WooCommerce store.

Your cookie policy page is now live on your WooCommerce store. You can link the cookie policy in your website footer, and within your cookie banner so visitors can read it before they give consent.

Option 2: Hosted URL

Displays your cookie policy through a hosted link. The policy updates automatically whenever you make changes in CookieYes.

Step 1: Copy the hosted URL

  1. In the modal, select Hosted URL.
  2. Click Copy URL.
hosted-url.png

By default, the policy uses the visitor’s browser language. To set a specific language, add its code to the end of the URL. For example, /fr for French: https://legal.policygenerators.com/cookie-policy/xxxxxxxxxxxxxxxxx/fr

Tip

If someone else manages your website, click Send URL to a teammate to share the link with them.

These steps add the link to your footer menu, though you can place it anywhere on your site.

  1. Log in to your WordPress admin dashboard.
  2. In the left-hand menu, go to Appearance > Menus.appearance-menus-wc.png
  3. Select your footer menu, or the menu where you want the link to appear.
  4. Under Custom Links, paste the hosted URL in URL and enter Cookie Policy in Link Text.
  5. Click Add to Menu, then click Save Menu.
Note

For block themes, go to Appearance > Editor and add the link to the Navigation block in your footer.

Option 3: Code snippet

Adds the cookie policy using a JavaScript snippet. The published policy updates automatically whenever you make changes in CookieYes.

Step 1: Copy the code snippet

  1. In the modal, select Code snippet.
  2. Click Copy code.
copy-code-cs.png
Tip

If someone else manages your website, click Send code to a teammate to share the code with them.

Step 2: Create a policy page in WooCommerce

  1. Log in to your WordPress admin dashboard.
  2. In the left-hand menu, go to Pages > Add Page.add-page-wc.png
  3. Enter the title Cookie Policy, then click Save draft.

Step 3: Embed the policy code

  1. In the top-right corner of the page editor, click the Options (⋮) icon, then select Code editor.code-editor-wc.png
  2. Paste the JavaScript snippet into the code field.paste-code-wc.png
  3. Click Publish.publish-wc.png

Option 4: HTML format

Adds the cookie policy as static HTML. You update the page manually whenever the policy changes.

Step 1: Copy the HTML

  1. In the modal, select HTML format.
  2. Select your preferred language.
  3. Click Copy code.
html-format.png
Tip

If someone else manages your website, click Send code to a teammate to share the code with them.

Step 2: Create a policy page in WooCommerce

  1. Log in to your WordPress admin dashboard.
  2. In the left-hand menu, go to Pages > Add Page.add-page-wc.png
  3. Enter the title Cookie Policy, then click Save draft.

Step 3: Add the HTML

  1. In the top-right corner of the page editor, click the Options (⋮) icon, then select Code editor.code-editor-wc.png
  2. Paste the HTML into the code field.paste-code-wc.png
  3. Click Publish.click-publish-wc.png
Note

To remove the Cookie Policy heading at the top of the page, delete the following line from the HTML code: <h1 class="cookie-policy-h1">Cookie Policy</h1>

Conclusion

Your cookie policy is now live on your WooCommerce store. Link it in your store footer and within your cookie banner so visitors can read it before they give consent. If you used HTML format, update the page whenever you change the policy in CookieYes.

Was this article helpful?

Have more questions?

Reach out to us and we'll answer them.

Contact us