Posted: January 7, 2021 at 11:04 am
I had this code in place and it was working. It checks for any unpaid event registrations and outputs a message/link rather than letting the user register for the event. It has stopped working (don’t know when) If I hard code the ID things work as expected. $user->ID outputs the correct WP User (1292) Any ideas what might be going on?
|
|
Hi there, $att_id = get_user_option( ‘EE_Attendee_ID’, $user->ID ); Will return false if the Whilst you’ve hard coding a test contact above, was the registration for that created on the front end of the site whilst logged into that test account?
May well be the ID of the contact linked to that registration, but has that user account set up the EE_Attendee_ID user meta data linking the user to the EE_Contact (by registering onto an event using matching details for the WP User whilst logged in)? If you edit the EE Contact with ID 24346 does it show a linked WP User? Like this: https://monosnap.com/file/HQq0QxXI5vKQKMixVfg5MEmzYu80Gv If not then it’s not linked to a WP User account |
|
Ahh. That makes sense now. I created the registration from Admin since I’m trying to set up a test account so the client can see what happens when a user has unpaid registrations. I’ll go back and complete a registration from the front end and I’m thinking that will resolve the issue. As always, I appreciate the timely and detailed advice/response. |
|
You’re most welcome, please do let me know if you run into further issues. |
|
The support post ‘Not getting EE_Attendee_ID’ 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.