You’ve probably already read that one of the GDPR requirements is to add a consent/privacy policy checkbox to all your forms that gather personal data, including your WooCommerce checkout page.

Cloudways

At this point, by default, WooCommerce only allows you to add a Terms & Conditions checkbox on the checkout page.

And yes, I’m aware that they’ll implement some GDPR features in the 3.4 version, but it will still be a little different from what I’m about to show you.

Cloudways

In WooCommerce 3.4, a privacy policy snippet will be added in the checkout page, not a checkbox, as you can see below.

woocommerce policy snippet

While this might be enough to comply with the GDPR requirements, some of you might want to go further, to be extra safe, and add another checkbox for the users to check if they agree with your privacy policy.

Cloudways

How to add a privacy policy checkbox in the WooCoommerce checkout page

To add a privacy policy checkbox in the WooCommerce checkout page, you’ll need to add some code in your theme’s functions.php file.

To do that, first, you’ll need to know how to access and edit your WordPress files.

The functions.php file is usually found in /public_html/wp-content/themes/YOURTHEMENAME-child/functions.php. This is for your primary domain.

If you want to edit the file of an add-on domain that’s found on the same hosting account, you’ll most likely have to go here: /public_html/YOURDOMAIN.COM/wp-content/themes/YOURTHEMENAME-child/functions.php.

Cloudways

This might differ from web host to web host.

I recommend backing up the functions.php file or the whole website before making any changes, and I also recommend having a child theme in place.

Once you’ve opened the functions.php file for editing, add the below code at the very bottom, or right before ?> (if there’s any).

Copy to Clipboard

Don’t forget to add your actual domain name for the privacy policy page.

Save the file and that’s it!

A privacy policy checkbox should appear in your WooCommerce checkout page.

woocommerce privacy policy checkbox

You can change the label text and error message with whatever you see fit.

That’s a wrap

Hope you found the post useful and comprehensive!

If you have any questions or thoughts, drop a comment, contact us or message us on Facebook.

You can also follow us on Twitter and subscribe to our YouTube channel.

If you want to start your own WordPress blog, or need a website for your business, our WordPress services are at your disposal! We also provide WordPress support and maintenance!

You can also purchase a ready-made WordPress website with hosting and support included!