easy-digital-downloads
easy-digital-downloads copied to clipboard
Introduce edd_has_user_downloaded function
Enhancement Request
Explain your enhancement (please be detailed)
As part of the refund functionality introduced in EDD 3.0, a big part of digital store refund policies is if the customer has downloaded the product files or not. It would be useful to have a function that checks if an order has been downloaded fully or partially by the customer. This would be similar to the edd_has_user_downloaded() function.
This could be displayed either next to each cart item (on a per-product basis) within the admin panel.
Justification or use case
Improved refund assessment.
Noting that this might exist here: https://github.com/awesomemotive/edd-all-access/blob/de6a057c877980e2cbba34e11ba79f8f5fbfee73/includes/functions/downloading-functions.php#L387
I can agree that this could be helpful information. I think in the case of EDD core, we just need the item object, and in the context of the order details screen, we do already have that.
I actually built this for another add-on for a client, it was easy with EDD 3.0 tables. While this probably won't happen for a while, but it would be better if the actual product file meta (related to products) was stored in a custom table, along with the bundled product IDs. Using serialised data (in meta) is pretty annoying and not optimal for this purpose.
I ended up checking for both partial and full download statuses with my function, which might be worth considering here.