Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ******CREATE NEW MEMBER IN MY HR SUPPORT CENTER****** //
- function create_member_in_mhrsc( $user_id, $infusionsoft_contact_id, $post_data ) {
- // Check if there's already a contact record
- $wp_user = $user_id;
- error_log( $wp_user .' is set');
- $mhrsc_member_id = get_user_meta( $wp_user, 'hrsupportcenteruid', true );
- $user_st = get_user_meta( '192', 'billing_state', true );
- $user_co = get_user_meta( $wp_user, 'billing_company', true );
- error_log( $user_st.' is the state');
- error_log( $user_co.' is the company');
- if( ! empty( $mhrsc_member_id ) ) {
- return $mhrsc_member_id;
- error_log('Member already exists');
- } else {
- $cid = $infusionsoft_contact_id;
- $url = MYHRSC_GF_USERS_SB_URL;
- $method = "POST";
- member_data( $user_id, $cid, $url, $method, $user_st, $user_co );
- } //endelse
- } // endfunction: create_member_in_mhrsc()
- // ******CREATE NEW MEMBER IN MY HR SUPPORT CENTER****** //
- add_action( 'wpf_user_created', 'create_member_in_mhrsc', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement