Custom Field added to Registration field

Hi There,
Could you help me please.
I have created a custom field called Introducer_Code in the register form and whilst I can find it in my database in a table called “wp_usermeta”. The field it’s found in is “meta_value”.
Please look at the data from this field which is “a:1:{s:15:“introducer_code”;s:4:“6969”;}” I need to be able to extract the value “6969”
How would I run a select query to get the data.

Thanks for any help you can give.

Best Regards,

Steve.

Hi Steve.

That is a serialized array, that’s why it looks odd.

You could use this: WP Admin > s2Member > API / Scripting > s2Member PHP/API Constants > S2MEMBER_CURRENT_USER_FIELDS

Or these:
https://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_s2member_custom_fields()

https://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field()

I hope that helps. :slight_smile:

1 Like