Last month we blogged about the way we were approaching GDPR in WooCommerce. We’re happy to be able to say that most of these features are now ready in WordPress 4.9.6 (beta), and we’ve finished our work in WooCommerce core also.

This post summarises the changes and features you’ll find in our 3.4 release scheduled to drop May 23rd.

Personal data exporter

WordPress 4.9.6 includes both the ability to export personal data associated with an email address to a HTML file. WooCommerce 3.4 will add to the generated export file, exporting the following data:

  • Customer address/account information
  • Orders associated with the given email address
  • Download permissions and logs associated with the given email address

To ensure requests are genuine, 4.9.6 includes a requests table and confirmation email to verify the request. The verification flow consists of the following steps:

  1. Add an email address or username.
  2. The user is notified via email with a confirmation link.
  3. The confirmation link is used and the request is marked “confirmed”.
  4. Admin triggers an email to the user which contains a link to download their personal data.
Slack - A8C 2018-05-03 18-20-52.png
Export requests table


Personal data files can also be manually generated by the admin and downloaded. The file itself is a simple HTML file, zipped.

Slack - A8C 2018-05-02 15-47-00.png
A sample export file


WordPress exports it’s own data in the same way, so things such as media files, posts, and comments/reviews are also taken care of!

Personal data eraser

Like the exporter, the eraser allows you to verify requests are legitimate before fulfilling them. It uses the same verification/email/requests system as the exporter.


Remove Personal Data ‹ WordPress — WordPress 2018-05-02 15-50-56.png

We understand this can be slightly more complicated with stores because you may need to keep data for other reasons, such as tax compliance or compliance with other laws.

With that in mind, we have made some of our erasure routines optional:

WooCommerce settings ‹ WordPress — WordPress 2018-05-02 15-53-02.png


These settings are off by default.

Additionally, if you ever delete a user manually, we’ve improved our cleanup functions so that the following data is removed along with the user:

  • Payment tokens
  • Addresses
  • Orders (are converted into guest orders)

And if you need to manually anonymise orders in bulk for a user you can search for them in admin and use the new “remove personal data” bulk action:

Monosnap 2018-05-02 15-56-46.png


This keeps the order around, but removes all personal data and converts the order into a guest order.

Data retention settings

To help reduce the amount of personal data that’s stored, WooCommerce 3.4 allows you to define how long you want to retain data that is no longer needed for order processing:


Slack - A8C 2018-05-02 15-10-17.png

These settings are found in WooCommerce > Settings > Accounts and privacy.

  • Failed, pending, and canceled orders which get cleaned up will be moved to the trash.
  • Completed orders which get cleaned up will be anonymized so sales stats are unaffected.
  • Inactive accounts will be deleted. An inactive account is one which has not been logged in to, or which has not placed orders, for the specified time.

If enabled, cleanup will run via a daily cron job. Inactive accounts are tracked using meta data, and only subscribers/customer accounts are removed. An upgrade routine will set all account last active times to the time you updated to 3.4.

Checkout page display options

To reduce the amount of personal data stored you can turn off some optional fields you may not require for processing.

Customize: Checkout – WordPress 2018-05-02 14-45-13.png


Additionally, you can now change the terms and conditions checkbox text to meet your needs:

Slack - A8C 2018-05-02 14-47-09.png


Both of these options can be found in the Customiser (Appearance > Customizer > WooCommerce > Checkout) and the preview is live so you can see what effects these changes will have on your checkout before hitting publish.

Privacy policy page

WordPress 4.9.6 includes a privacy page setting as well as a mechanism for plugins to suggest content. WooCommerce adds some suggested content of it’s own.

Edit Page ‹ WordPress — WordPress 2018-05-02 15-07-08.png


Other plugins can do the same which should allow you to piece together a policy which applies to your users.

Privacy policy snippets

If you define a privacy policy page, it’s useful to be able to link to that page where needed. WooCommerce will output notices and links to the privacy policy in two locations:

  1. Account registration form
  2. Checkout form

The notice in the case of the checkout is shown above the place order button automatically:

Slack - A8C 2018-05-02 14-52-38.png


Both notices can be customised in WooCommerce > Settings > Accounts and privacy or the Customiser.

Slack - A8C 2018-05-02 14-51-19.png


Changes to log files

We’ve made some changes to our logging system in core, as well as revised what data gets logged.

  • We’ve done an audit of our usage of logs in WooCommerce and removed any unnecessary personal information from the logs. Notably:
    • Webhook logs no longer log the webhook body and response unless WP_DEBUG mode is turned on. This avoids personal information sent with webhooks being logged to the server.
    • PayPal debug logging no longer logs the personal data sent to PayPal and masks it out. The setting itself now includes a disclaimer that it should be used for debug purposes only and should be disabled when complete.
    • For PayPal specifically, payer email/name is no longer logged within order meta – this information can be found using the transaction ID and visiting the PayPal website instead.
  • When PayPal debugging logging is turned off, the logs are purged.
  • Logs will now rotate daily, and log files will be deleted after 30 days by default. A filter can be used (woocommerce_logger_days_to_retain_logs) to extend this if needed. The cleanup is performed using a cron job.

These changes apply to both file based logging, and database based logging, which are both options within WooCommerce core.

Closing comments…

The above features will require both WooCommerce 3.4 and WordPress 4.9.6. Both will be released before the May 25th GDPR deadline. If you’re interested in testing WooCommerce 3.4, see our beta announcement here.

Thanks for testing!