Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ali Qureshi

    (@parorrey)

    If s2member data is being stored either in BuddyPress extended profile or in wordpress user meta tables, then yes..

    There is no harm in trying.. just download and try.. I expect it to work.. Just make sure you call the fields correctly.

    Thread Starter iScot

    (@iscot)

    Dear Ali,

    Thank you for your fast response. Your API works well. Except in the case where the meta-value must be stored as “serilized array”.

    the end result should be:

    meta_key = wp_s2member_custom_fields
    meta_value =a:3:{s:12:”mobile_phone”;s:10:”0123456789″;s:12:”country_code”;s:2:”FR”;s:11:”postal_code”;s:5:”75016″;}

    But if I send the following URL:
    json_url $ = “https://www.chkun.com/api/user/update_user_meta/?cookie=”. $ arg1. “& meta_key = wp_s2member_custom_fields & meta_value =”. $arg9;

    Where $arg9 = a:3:{s:12:”mobile_phone”;s:10:”0123456789″;s:12:”country_code”;s:2:”FR”;s:11:”postal_code”;s:5:”75016″;}

    The stored value is:
    s:103:”a:3:{s:12:”mobile_phone”;s:10:”0123456789″;s:12:”country_code”;s:2:”FR”;s:11:”postal_code”;s:5:”75016″;

    In summary instead of a table I get a string!

    Any idea to what to do ?

    Plugin Author Ali Qureshi

    (@parorrey)

    Hi,

    firstly, s2member custom_fields are being stored in wp_options table not in wp user meta table.

    secondly, plugin stores all data in correct format whether as string or in serialized form when saving any array. only array data is saved in serialized form.

    To enable s2member fields with registration, I will add this feature today in my pro version of plugin JSON API User Plus, and let you know.

    Lastly the correct way of calling url, when it will be available:

    https://www.chkun.com/api/user/update_options/?cookie=". $ arg1. "& meta_key = s2member_fields & country=Germany&city=Berlin&mobile_phone=0123456789

    All this data wll be saved in serialized form and you will also get the data from other end point:

    https://www.chkun.com/api/user/get_options/?cookie=". $ arg1. "& meta_key = s2member_fields

    I will let you know when available.

    Thanks

    Thread Starter iScot

    (@iscot)

    Hi Ali,

    Thank you. I’ll wait for your pro version plugin.

    But belive me, “wp_s2member_custom_fields” are stored in table “wp_usermeta”. s2member stors new custom fields there !

    Thank

    Plugin Author Ali Qureshi

    (@parorrey)

    I did not check it, but in any case, wherever they are, you need not to worry. you just call endpoint. I will store it in the same location they are doing.

    BTW, you can;t search effectively if all the fields are stored in this manner. They should have stored every field separately in user meta table making it easily searchable.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘User registration with s2member’ is closed to new replies.