GDPR WooCommerce custom privacy policy checkbox

 In Media

General Data Protection Regulation (GDPR) coming into effect on 25th May 2018, is your WordPress website and WooCommerce store complying with the new rules?  On this post, I will try to explain and cover everything that you need to know about this new EU law that is set to come into effect in 2018.

What is GDPR Compliance?

Quick summary of site owners’ obligations relating to the collection of user data from EU citizens:

  • Tell the user what your site is and why you are collecting their personal data
  • Tell the user how long you will have their data and who will receive this information
  • Get consent from users before collecting any user data
  • Let users access their own data and take it with them
  • Enable users to delete their own personal data
  • Let users known if any data breaches affect their data

GDPR Compliance with WordPress

In case you’re a WordPress plugin author that has a plugin that handles user data, you need to be aware of the new EU GDPR compliance that will come into effect from May 2018.  WordPress is developing a GDPR plugin standard this means that there will be a unified descriptive methodology of the type of data being stored, where it is stored and how long it is there for this plugin standard will also offer key information on how to safely handle the deletion of any user data.

This new plugin standard from WordPress aims to give developers a simple solution to GDPR compliance when it comes to validating your plugin.  It also ensures that Website Administrators will have the overview and tools they need to handle any tasks associated with GDPR compliance. This solution from WordPress is free and offers a simple guide to creating a file.  This file will describe all of the different user data that the plugin is likely to handle.  This file will be available for anyone to read.

What You Need to Be Aware of As a WooCommerce Shop Owner

Firstly, it’s super important that you do your research on GDPR compliance as each WooCommerce site will use a different set of plugins.  With this new EU law, there isn’t a one-size-fits-all approach.  You will need to be aware of why you need to do for your specific site.

If you sell products to customers within the EU or have EU shoppers visiting your WooCommerce site, you’ll need to ensure your site complies with GDPR.  It’s your responsibility to communicate how you are using your customers’ information.  Also, this means you may need to update the privacy policy for your site to make clear how your WooCommerce site will comply with GDPR.

What Resources Are Available to Help with GDPR Compliance?

We need to make clear that GDPR will impact how every site in the EU operates.  There’s a lot of help and resources out there to assist you.  Make sure to check out the Complete WordPress GDPR Guide from Code in WordPress.  This provides a detailed overview of how they will help plugin developers ensure they are GDPR compliant.

Useful links:

WordPress GDPR

An Introduction to GDPR Compliance for WooCommerce Stores

The EU General Data Protection Regulation 

The code below allows you to add an extra WordPress WooCommerce "privacy policy" link and an extra text label on checkout page


// Add terms and policy check box in checkout page
add_action( 'woocommerce_checkout_after_terms_and_conditions', 'add_terms_and_policy', 20 );
function add_terms_and_policy() {
    $button_text = __("Privacy Policy", "woocommerce");
    $button_link = home_url("/protest/privacy-policy/");
    $button = '<a href="' . $button_link . '" target="_blank">' . $button_text . '</a>';
    $message = sprintf( __( "I have read and accept the %s and understand how you manage my Data under GDPR", "woocommerce" ), $button );
    ?>
    <p class="form-row terms wc-terms-and-policy">
        <label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
            <input type="checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" name="terms2"  id="terms2" /> <span><?php echo $message ?></span> <span class="required">*</span>
        </label>
        <input type="hidden" name="terms2-field" value="1" />
    </p>
    <?php
}

// Validate required terms and policy check box
add_action( 'woocommerce_checkout_process', 'terms_and_policy_validation', 20 );
function terms_and_policy_validation() {
    if ( ! isset( $_POST['terms2'] ) ){
        $text = __("Privacy Policy", "woocommerce");
        $message = sprintf( __( "I have read and accept the %s and understand how you manage my Data under GDPR", "woocommerce" ), $text );
        wc_add_notice( sprintf( __( 'You must accept "%s".', "woocommerce" ), $message ), 'error' );
    }
}

Recent Posts

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Start typing and press Enter to search

Let's work together

I'd love to work with you! Please fill out my project form to tell me more about your project/work. I reply to all enquiries within 48 hours.

Availability

  • June - Booked
  • July - Booked
  • August - Limited

Rates

  • My day rate is £300.
  • I can provide a fixed price for your work.
  • Projects start at around £2,000.

Header Enquiry Form

  • This form collects your name, email address and telephone number so that I can respond to the enquiry(ies) that you submit via this website. Please check my privacy policy for the full story on how I use, protect and manage your submitted data.