woocommerce add privacy checkbox on checkout form

WooCommerce: Add Privacy Policy Checkbox On Checkout Form

What if you need to add a required privacy policy checkout box on your WooCommerce checkout form?

woocommerce privacy policy checkbox on checkout form

WooCommerce adds a Terms & Conditions in the checkout but there’s no setting to add the same for the privacy policy page and in some countries, this is required under national privacy laws.

Thankfully there is a quick code snippet to make this happen.

https://gist.github.com/DeveloperWil/e41ae77d8d400d1bad817895cd0e4b11

Where To Put The Code Snippet?

This code snippet should go in your active theme’s functions.php file.

Add it to the bottom of the file, before any closing ?> characters.

It’s always a good idea to take a backup of your functions.php file in case anything goes wrong – you can just copy the old code back in again.

Was this article helpful?
YesNo