edd_has_user_purchased()
This conditional function will allow you to check whether a user has purchased a particular digital product.
The function takes two parameters:
- $user_id – the ID number of the user to check
- $download_id – the ID number of the download to check
Example:
if( edd_has_user_purchased($user_id, $download_id) ) { // the current user HAS purchased $download_id } else { // the current user has NOT purchase $download_id }