get Vendor Registration Information
-
Hello . thank you for your good work!
I am using a CRM and want to get vendors data (when they register) into my CRM as leads.
Somehow i was able to rich my goal to get vendor’s name and family and email address but i could not do it for phone , address and other data . I did it by creating a small plugin and added to wordpress.Here is the important part of the code :
//requirements curl $user_info = get_userdata($user_id); $username = $user_info->user_login; $first_name = $user_info->first_name; $last_name = $user_info->last_name; $leadname = $first_name . ' ' . $last_name; if ($leadname == ' ') { $leadname = $user_info->user_nicename; } $email = $user_info->user_email; $website = $user_info->user_url; /*It's not working*/ $user_phone = get_user_meta( $current_user->ID, 'billing_phone'); /*It's not working*/ $phone = get_user_meta($user_id,'billing_phone');/*It's not working*/ $phone2 = $user_info->billing_phone;/*It's not working*/ $store_name = $user_info->store_name;/*It's not working*/ $leadsgroup = $options['crm_input_field_2']; // Do the magic - execute cURL curl_setopt($ch, CURLOPT_URL, $posturl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "source=$leadsgroup&status=1&name=$leadname&website=$website&email=$email&phone=$phone&company=$store_name"); $headers = array(); $headers[] = 'Authtoken: ' . $apikey; $headers[] = 'Content-Type: application/x-www-form-urlencoded'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
// Save result for logging purposes
$result = curl_exec($ch);
file_put_contents($dir . ‘lastoutput.txt’, $result);——end code——-
I could get information for name, family and email.
The questions are :
1- How can i get information for these field when vendors register on the site . Phone, address, zip code, store name and store url, city?
2- I made some custom field to get vendors whatsapp on vendor regestration page using WCFM -> setting -> custom fields
How can i get custom field information ?Thank you very much for your help!
Regards,
- The topic ‘get Vendor Registration Information’ is closed to new replies.