Support

Home Forums WP User Integration Import phone number to WP user profile

Import phone number to WP user profile

Posted: March 6, 2017 at 9:07 am

Viewing 5 reply threads


Tony

  • Support Staff

March 9, 2017 at 3:53 pm

Hi there,

The phone number question you have as mandatory, is that the phone EE system question?

I’m assuming your are using the EE4 User integration add-on to autofill the details?

If so you can use this snippet: https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-wp-user/jf_filter_address_answer_for_wpuser.php

Which extends the autofill to include address questions (and the phone question).


ICF Calgary

March 9, 2017 at 4:03 pm

Yes, it’s the phone number within the “personal information” question group.

Yes, I’m using the EE4 User integration add-on to autofill the details.

Do I add this snippet on my functions.php on the child theme?


Tony

  • Support Staff

March 9, 2017 at 4:13 pm

You can, although I’d recommend creating a custom functions plugin and placing it within that:

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


yosh

March 14, 2017 at 8:04 pm

Hello,
I successfully populate some custom fields I added on the event registration form with data from the extended user profile (using buddypress for user profiles). My question is: which function do I have to change in order to sync the values to the profile if sync option is enabled? Wherever the name, last name and email are syncing I just have to add my fields, but I can’t seem to find where.
Thank you,


Tony

  • Support Staff

March 15, 2017 at 6:26 am

The function that updates the user profile is EED_WP_Users_SPCO::process_wpuser_for_attendee

If you look within that function you’ll find 2 actions you can use to update the user:

AHEE__EED_WP_Users_SPCO__process_wpuser_for_attendee__user_user_created

Is fire when a new user is generated and allows you to update more information that EE does by default.

do_action( 'AHEE__EED_WP_Users_SPCO__process_wpuser_for_attendee__user_user_updated', $user, $attendee, $registration );

Is fired every time that above function is called and allows you to update additional details.

If you take a look within EED_WP_Users_SPCO.module.php you’ll see how the EE4 Users Add-on does this with the current details.

Viewing 5 reply threads

The support post ‘Import phone number to WP user profile’ 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