Created
November 24, 2023 14:11
-
-
Save Pebblo/5672298dc0ae3eff641b00034a6163be to your computer and use it in GitHub Desktop.
Example of how to change the REG Code generated within Event Espresso 4+
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
<?php //Do not include the opening PHP tag if you already have one | |
function tw_ee_add_year_prefix_to_reg_code($reg_code, $transaction, $ticket) { | |
// Add a date prefix using 'C{year}-' | |
$prefix = 'C' . date("y") . '-'; | |
//Return $reg_code | |
return $prefix . $reg_code; | |
} | |
add_filter('FHEE__Create__regCode__new_reg_code', 'tw_ee_add_year_prefix_to_reg_code', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment