easy-digital-downloads icon indicating copy to clipboard operation
easy-digital-downloads copied to clipboard

Introduce edd_has_user_downloaded function

Open arraypress opened this issue 5 years ago • 3 comments
trafficstars

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.

arraypress avatar Oct 09 '20 14:10 arraypress

Noting that this might exist here: https://github.com/awesomemotive/edd-all-access/blob/de6a057c877980e2cbba34e11ba79f8f5fbfee73/includes/functions/downloading-functions.php#L387

dgoldak avatar Sep 27 '22 15:09 dgoldak

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.

robincornett avatar Oct 17 '22 12:10 robincornett

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.

arraypress avatar Oct 17 '22 12:10 arraypress