WooCommerce 3.3 will include a new download logging/reporting feature to track who downloads what from your store (when selling digital products). The issue relating to this was initially logged here.

This feature was contributed by @procifer during his trial (Automattic is hiring!). The pull requests for this can be found here and here. They add the following:

  • A new WC_Customer_Download_Log class supporting data stores to store logs to a custom table in the database.
  • Revised how download ids are generated to no longer rely on md5 hashes of filenames. This means each download has a unique ID which can be tracked.
  • A new report which lists downloads made by customers, along with information such as IP address.
  • Permission checks utilise the download log/tracking functions to make them more robust.

Visually, when viewing a download permission inside an order you’ll see a new link to the reports:

Edit order ‹ Local WordPress Dev — WordPress 2017-11-22 12-36-56.png

When this is clicked you’ll go off to the reporting section to see logs filtered to this permission ID:

Reports ‹ Local WordPress Dev — WordPress 2017-11-22 12-38-54.png

You’ll notice we track the following per download:

  • Timestamp of download event
  • Product/file that was downloaded, from what ID
  • Logged in user name
  • IP Address

The Reports > Orders > Customer downloads section allows you to filter logs by any of these properties.

Reports ‹ Local WordPress Dev — WordPress 2017-11-22 12-41-58.png

Thats it 🙂 Just a small enhancement we hope you’ll find useful.