Login
Get Started

Easy Digital Downloads Documentation

Documentation, Reference Materials, and Tutorials for Easy Digital Downloads 

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	
}
Was this article helpful?

Start selling today!

Join over 50,000 smart store owners, and start using the easiest way to sell digital products with WordPress.

Copyright © 2025 Sandhills Development, LLC