Support

Home Forums Event Espresso Premium Registration Code Prefix

Registration Code Prefix

Posted: November 20, 2023 at 10:43 pm


mbote

November 20, 2023 at 10:43 pm

I have registration codes in the following format. Reg Code: 20-5-1-48bb.

I would like to add a prefix so that it can look like below C24-20-5-1-48bb. This is to help in easier searching where a specific year has its own prefix. Kindly assist.


Tony

  • Support Staff

November 21, 2023 at 2:50 am

Hi there,

The reg code is passed through a filter so if you are comfortable with PHP you can customize the output, take a look at the FHEE__EE_Registration_Processor___generate_reg_code__new_reg_code filter for this.


mbote

November 21, 2023 at 9:10 am

I am not very good at it. Is it something you could assist


Rio

  • Support Staff

November 22, 2023 at 8:16 pm

Hi there,

I’m sorry, but we can not provide support for custom coding such as this, you would need to contact a developer to help you customize the reg code.

We have a list of developers familiar with Event Espresso available here:

https://eventespresso.com/developers/event-espresso-pros/

You can also check the article here on how to work with filters.
https://eventespresso.com/wiki/ee4-custom-post-types/#archive_event_template

thanks


mbote

November 22, 2023 at 9:42 pm

This reply has been marked as private.


Tony

  • Support Staff

November 24, 2023 at 7:13 am

Hi there,

The file I am working on is event-espresso-core-reg/core/business/EE_Registration_Processor.class.php

Why are you modifying a core file here? There’s a filter literally 2 lines above to allow you to customize how the Reg Code has been generated but above you are attempting to hack up the core plugin for this feature.

Please remove that code, we can’t provide any support when you modify core files.

Checking into this a little more you would be better to use a different filter as we’ve deprecated the one above, so:

FHEE__Create__regCode__new_reg_code

Here is an example of how to use a filter:

https://gist.github.com/Pebblo/5672298dc0ae3eff641b00034a6163be

You can add that to a custom functions plugin on your site.

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


mbote

November 25, 2023 at 4:34 am

Thanks alot or that.


Rio

  • Support Staff

November 26, 2023 at 6:04 pm

Where you able to make it work?

thanks


mbote

December 5, 2023 at 12:30 am

Yes. That worked well.


Tony

  • Support Staff

December 5, 2023 at 2:20 am

Awesome, I’ll mark this thread resolved.

Have a great week 🙂

The support post ‘Registration Code Prefix’ 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.

Event Espresso