Categories
Core

WC 3.3 Download Logging Feature

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.

By Mike Jolley

I help build things at Automattic.

7 replies on “WC 3.3 Download Logging Feature”

Will the WooCommerce Subscriptions plugin still work? Will it need to be updated? If so, will it be updated before this is released? (a question for Automattic and Prospress)

The rate of change in WP/Woo is becoming unsustainable for me. Every time I am ready to launch an extension and site to sell it from, the rug gets pulled out from under me and I have launched nothing yet, been working on it coming up on a year now.

Is there any intention to slow the pace of change? Is the intention to keep one-man-shops out of the business? Because that is what is about to happen to me before I even get started.

Like

I’m not sure what this feature have to do with subscriptions?

We’ve already slowed down the pace of breaking changes through the adoption of SemVer. These minor releases contain mostly enhancements.

Liked by 1 person

Thanks for the reply! Sorry for the confusion, I was thinking of the “WooCommerce API Manager” extension as well as the “WooCommerce Subscription Downloads” extension.

In particular:
https://docs.woocommerce.com/document/woocommerce-api-manager/#section-9
and
https://docs.woocommerce.com/document/woocommerce-api-manager/#section-19

Buzzwords aside, glad to hear you have slowed the pace of changes. Maybe take it down another notch? Thanks!

Since WooCommerce.com no longer lists new extensions, I need the “WooCommerce API Manager” extension to work, otherwise I might have to abandon Woo for my extension store and Use Easy Digital Downloads instead. But I would rather eat my own dogfood and use Woo to sell Woo extensions for the sake of appearance.

Like

Will it be possible to disable this feature if the extra stats aren’t required? Just to save precious space on our growing WC database :]

Like

Hi Mike, ah ok no problem. I assume this won’t slow the database down much if the data is stored in a separate table as per “Adding a dedicated table for logging who downloads what (User, download, IP)” in the Github issue.

Liked by 1 person

Nicely done! Quick question, are there going to be any new action/hooks added to this?

We could use “woocommerce_before_customer_download_log_object_save” action to be able to parse the download log data into other plugins; but that feels a bit ‘dirty’.

The previous download action hooks seem to no longer be triggered.

Like

Comments are closed.