/EE reg id Secret
Last active
December 19, 2015 21:18
Remove the Registration ID and replace it with a custom one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This goes in the custon files add on | |
// 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 ); | |
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 strtr($id, '01234567890', 'abcdefghij'); | |
} | |
add_filter('filter_hook_espresso_registration_id', 'my_custom_registration_id', 10, 1); | |
// If you are running Ticketing you will need to edit the ticket functions.php file as well, approx line 126 | |
//Make sure we have attendee data | |
if ($attendee_id=="0" || $registration_id=="0" || (!is_string($registration_id))) | |
return; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment