Skip to main content
Easy Digital Downloads Documentation
Documentation, Reference Materials, and Tutorials for Easy Digital Downloads


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


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	
Read our latest blog post:
How to Increase Your WordPress Site Speed