Tips and Tricks HQ Support Portal › Forums › WP eMember › eMember API only adds minimum fields
Tagged: emember api, emember_api
- This topic has 7 replies, 4 voices, and was last updated 11 years ago by sawyerjw.
-
AuthorPosts
-
November 30, 2013 at 2:09 am #10133sawyerjwSpectator
I am using Formidable Pro to create forms for various membership levels. I can post the data on the form to the API and create a member, however, it only populates the first name, last name, email and membership level fields. If I provide username and password it will populate those, as well.
I would like to be able to populate the address street, city, state, zip, country, phone, and company name fields, as well. Is there a way to do this via the API? I’ve not been able to determine how to go about that if there is.
Also, I noticed in another post a couple of functions to determine whether a member is already registered, e.g. emember_wp_email_exists($email). Is there a list somewhere of the available functions? I had created my own function before finding this one.
Thanks.
November 30, 2013 at 8:14 am #59330mbrsolutionSpectatorHello sawyerjw you might want to check the following URL
Kind regards
November 30, 2013 at 11:11 pm #59331adminKeymasterYes you can also send the phone, address street, city, state, zip, country field to the API and it will populate those too. What version of eMember are you using now?
That function is just a normal function in the plugin. You can take a look at eMember_misc_functions.php file for a list of functions.
December 1, 2013 at 2:15 am #59332sawyerjwSpectatorThanks, @mbrsolution. I have seen that page before.
@admin: I’m using v8.7.3. I tried adding those fields to the CURLOPT_POSTFIELDS parameter without success. I’m assuming that the API is looking for $_POST values similar to the database field names, e.g. “address_street”, “address_city”, etc. Is that not correct?
Thanks for the pointer to eMember_misc_functions.php. That’s very helpful.
December 1, 2013 at 2:27 am #59333sawyerjwSpectatorOkay, I just found and looked through api/create.php. Nowhere in that code do any fields except the minimum appear. It does not appear to recognize any of the address fields, phone, etc.
December 1, 2013 at 4:20 am #59334nurMemberif you look at line 107 through 114 in api/create.php, you should be able to find address fields unless you are using a slightly old version of emember. We recently added those fields.
December 1, 2013 at 4:24 am #59335mbrsolutionSpectatorHello sawyerjw you might also want to update your plugin to the latest version
https://support.tipsandtricks-hq.com/forums/topic/debugging-javascript-errors-on-your-site
December 1, 2013 at 8:46 pm #59336 -
AuthorPosts
- You must be logged in to reply to this topic.