Posted: January 17, 2014 at 11:54 am
Can the UID number be replaced with our own 5 digit number, either randomly generated or serialized? If so, how? Thank you. | |
Hi Fred, I assume you mean the Registration ID for each attendee? If so check out this thread – http://staging.eventespresso.com/topic/custom-registration-id/ | |
This solution is not working for me. In fact, it is creating error messages; “An Error Occurred, No ID”. Perhaps I am doing something wrong. All I want is a five digit random ticket number rather than what is generated by EE. I have added the blocks of code to functions.php as suggested here: http://staging.eventespresso.com/topic/custom-registration-id/ and this is where the problems began – error messages. Can someone please give better instructions? Thank you. | |
Try this code: add_filter('filter_hook_espresso_registration_id', 'my_custom_registration_id', 10, 1); function my_custom_registration_id(){ $id = uniqid(); // for the sake of an example, we'll convert the unique ID to be letters from the alphabet, which would make for something similar to an airline's reservation code return substr(strtr($id, 'abcdefghi', '01234567890j'), 0, 5); } // remove default registration id filter function my_remove_registration_id_filter() { remove_filter('filter_hook_espresso_registration_id', 'espresso_build_registration_id', 10); } add_filter ('filter_hook_espresso_registration_id', 'my_remove_registration_id_filter', 9 ); Try adding this code to this blank plugin to hold the custom functions. | |
Thank you, Sidney. I will try and let you know. | |
Perfect, Sidney! Works like a charm. Thank you very much. | |
Glad to help. :) | |
The support post ‘Ticket Numbers’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.