Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Stores the information submitted during registration
*
*/
function pw_rcp_save_user_fields_on_register( $posted, $user_id ) {
if( ! empty( $posted['rcp_profession'] ) ) {
update_user_meta( $user_id, 'rcp_profession', sanitize_text_field( $posted['rcp_profession'] ) );
}
if( ! empty( $posted['rcp_location'] ) ) {
update_user_meta( $user_id, 'rcp_location', sanitize_text_field( $posted['rcp_location'] ) );
}
}
add_action( 'rcp_form_processing', 'pw_rcp_save_user_fields_on_register', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.