The code recipe below limits the specified discount codes to one use per “user” (a single username/email address in your WordPress Users list).
If you are using discount codes to give free trials, see this post for a better method to offer trial memberships that can only be used once.

The Code Recipe
Adding the Recipe to Your Website
You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.
Update the array on line 10 with the discount code(s) you would like to restrict to one time per user.