When generating a gift certificate code, is there any way to pass an argument to associate a piece of data (like an email) with a code that is generated? Or is there a better way to handle the following scenario?
- Site visitor (not member) purchases a gift certificate without creating an account (set up this way on purpose), and receives the link. Gives it to friend for a present.
- Friend does not need a gift certificate because they’re already a member.
- Original visitor asks for a refund, which we give them.
There’s no user to delete, because the purchaser didn’t make an account. I would love to invalidate the gift certificate code, though. The wp_options info for the gift certificate codes doesn’t include any information about the purchase, so I can’t tell which code is in question here.
I think I’m stuck in this situation, but for the future:
Is there a way that I can tag the wp_options entries upon generation, so that later I could find a particular gift code and determine its status (to see if we can grant a refund, and then to invalidate it if we do grant a refund). I’m wondering if there’s any flexibility built into those arguments to s2member_pro_redemption_code_generate() that I could take advantage of. I searched the GitHub repo to better understand the generation, but am not coming up with anything.
Thanks very much!
Val