Thanks @champsupertramp for the coding example. I think the major difference between what that S.O question is doing vs is what I am doing is that mine is external to WordPress so in my limited experience, I wouldn’t use register_meta()
.
I was able to test this out a little and have an UM user but one issue is that I can’t seem to update the submitted
meta_key which has the registration field submission aka profile. What this leaves me with is a created wordpress user that has a UM role but no profile data.
curl --user "api_user_name:application_key" \
-X POST \
-H "Content-Type: application/json" \
-d '{"username":"username","password":"password","email":"[email protected]","first_name":"first","last_name":"last","description":"is it a test","roles":["um_directory-member"],"meta":{"submitted":{"display":["Yes"],"description":"","read-add":"","provider-type":"PA","degree":"PA","SpecialtiesChk":["Primary Care"],"form_id":"679","um_request":"","_wpnonce":"","_wp_http_referer":"\/directory-sign-up\/","g-recaptcha-response":"","user_login":"username","first_name":"first","last_name":"last","user_email":"[email protected]","title":"Physician Assistant","organization":"USAF","phone_number":"123-456-7890","secondary_user_email":"","user_url":"http:\/\/NA","address":"","addreUL":"","addreUL_lat":"","addreUL_lng":"","addreUL_url":"","timestamp":1644382392}, "um_member_directory_data":{"account_status":"approved","hide_in_members":false,"profile_photo":false,"cover_photo":false,"verified":false}}}' \
https://domain.com/wp-json/wp/v2/users
`
When I query the usermeta table, I do see a meta_key um_member_directory_data
but I do not see one for submitted
. In the UI, when I click profile, I don’t see any fields filled out. How can I make sure the UM registration form is filled out as part of the user create POST?
-
This reply was modified 2 years, 8 months ago by powpow12.