How to post customized fields to wp_users table with WP-Members?

Question

I am using WP-members plugin and customized the user registration form with a filter hook like below.

add_filter( ‘wpmem_register_fields_arr’, ‘my_register_form_fields’, 10, 2 );
function my_register_form_fields( $arr, $tag ) {
if ( ‘new’ == $tag ) {
$arr[‘my_custom_field’] = array(
‘label’ => “My Custom Field”,
‘type’ => ‘text’,
‘register’ => 1,
‘required’ => 0,
‘profile’ => 0,
‘native’ => 0,
);
}
return $arr;
}

The user registration form is successfully customized with the filter hook above but I have no idea how to hook what function to have my database catch the information put on the custom field when user registration form is submitted. ( If I just use the above filter hook and do nothing else, when the user registration form is submitted, the information put on the custom field just disappear and not saved anywhere )
Can someone help?

0
, , Deku 4 years 2019-11-07T11:51:56-05:00 0 Answers 62 views 0

Leave an answer

Browse
Browse