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.
This content requires a premium membership plan.
Author: Kimberly Coleman
Kim is co-founder of Paid Memberships Pro. She has her hand in all aspects of the development, management, and marketing for the product and the team. She oversees frontend development for the core open source plugin and Add Ons.