Posted: March 16, 2024 at 2:08 am
Hi, I am using the snippets from ‘Unique emails upon registration’ ticket. But in Jqeury script I have an error: cannot read properties of undefined (reading ‘substr’) Can you help since this is very significant add on feature for your module! |
|
Hello, That example is not from EE, but you can check our snippet here, we used different approach though. You can also contact developers here for some modification needed. thanks |
|
I see your snippet is only for logged in users. Is that right? And if yes, please just describe to me what approach needed to make it for all visitors? Just to avoid spending time in documentation please guide in short… |
|
The snippet is to remove a ticket from the ticket selector is the current use already has a registration on that ticket linked to their contact. You can copy and paste the code to your child theme, but the best solution is to create a specific plugin and put it there. thanks |
|
Hi Rio, you have just answered me what I assumed. Since I really do not have time and I expected before purchasing the whole package that this kind of thing will be implemented as integrated option – I just need from you or your developers a HINTS (methods and functions) how to approach for event registration WITHOUT wordpress user logged in needed (for events without logged in user constraints). Thats all. I will then adjust the plugin/snippet… |
|
Awesome, if you need anything, feel free to reach us again. Have a wonderful day! |
|
Yes Rio I need. Third time I am asking: need from you or your developers a HINTS (methods and functions) how to approach for event registration WITHOUT wordpress user logged in needed (for events without logged in user constraints). |
|
Hi there, Without writing this code for you, I’m not sure what ‘hints’, methods or functions I can provide here. We don’t police registrations in the way you are trying to, so there is no function/method for checking if the current registration data matches a current registration on the event within core that I can point you to, you need something custom. It’s also easily bypassed with various email naming methods (email being what you would need to consider ‘unique’ here) such as tony@example.com and tony+1@example.com, that’s just bypassed your checks and allows for multiple registrations. The only ‘real’ way you are going to be able to limit registrations to prevent people from registering multiple times is to force login. — The original snippet you linked to uses the It’s the difference between this: https://monosnap.com/file/Ut8bgnHqN4X7v6xwcaf029OJtwVvDv And this: https://monosnap.com/file/0fnXBU8qCKhQeyHenlC6U2hWepUVMj That element is used by the snippet to find the Event ID: https://monosnap.com/file/Drh5yYNd4toXVjoq64ZgADi4Cvlt7I You’ve asked for some hints and personally, I’d look at doing this another way. I’d use the I don’t have an example of doing what you are trying to do, partially because of the reasons I mentioned above but I do have an example of using that hook here: https://gist.github.com/Pebblo/0b3b28c9d0c52d5425fa167da1f1a622#file-spco_hook_example-php-L1-L41 You can then loop over the registrations within valid_data and compare the values of those with previous registrations using the model system to pull in the details you need: https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System |
|
Thank you very much for detailed ‘hints’ 🙂 Regard the bypassed emails – since registrant will get the ticket on email he need to use the real ones. Also since we are doing closed B2B events all registrants are checked and approve after (this also I needed to do some customization for your process) so it is helpful for me to at least prevent several persons coming to event with single email… |
|
All of the emails I gave you are valid. tony@example.com They are all valid emails which could still all be mine, the first 4 all would likely go to the same inbox but would bypass any validation you have checking identical email addresses (sure you could stip out the +{string} up to the @ sign but where do we stop).
Great! I hope this works well for you. Any further questions just let me know 🙂 |
|
Hi… I had time a little to try something and I hope you can just answer me easy… In the code I mark where need help 🙂 function attendee_information__process_reg_step($process_reg_step, $reg_step, $spco) { // THIS PART I NEED HELP – HOW TO GET USER EMAIL FROM THE FORM $emails = $wpdb->get_results(‘SELECT ATT_email FROM wp_2_esp_attendee_meta meta } // Halt processing, add an error. // Always return process add_filter(‘FHEE__EE_SPCO_Reg_Step_Attendee_Information___process_registrations__pre_registration_process’,’attendee_information__process_reg_step’, 10, 3); |
|
Why have you changed the hook in use? By doing so you’ve broken the code.
Has totally different arguments to the hook I used in my original function, your function arguments now don’t match the expected objects.
Is no longer valid is as there isn’t a checkout property on an —
Can indeed be used, but runs after the registrations have been created within the database do you want to process data before that? —
Where is this from? |
|
The support post ‘Unique emails upon registration – errors’ 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.