Merged requested to merge colemanw/cividiscount:fixAnyEventCode into master
@ayduns noticed this issue:
- Create a discount code for "Any event"
- Try to use it when registering a participant (backend "Register Event Participant" form)
- See error: "The discount code you entered is invalid."
It appears to have been caused by @eileen's commit in !242 (merged) which was according to her comment a fix for something I did. I wish I knew specifically what, because this has been quite a game of whack-a-mole and I think the resulting "solution" is more complex than necessary. I think switching this whole function over to using APIv4 would solve a lot of these serialization issues. But for now, this fixes the bug while staying faithful to @eileen's fix as well.