Function to get customers of a download product
-
I’m working on an Addon for EDD and I’d like to get the user ID of users who have purchased a product.
Example, if a download has the ID 52, the function would work similar to this:
$user_ids = edd_get_customers_for_download(52); print_r($user_ids, true); // Outputs array of user ids
I was able to achieve this in WooCommerce by querying the
woocommerce_downloadable_product_permissions
for the product ID and getting back a list of the user IDs because that table also has a column foruser_id
I tried finding a similar table/relationship for EDD and unfortunately can’t figure it out yet
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Function to get customers of a download product’ is closed to new replies.