Snyc to Phone field
-
im using Buddyboss with a custom SMS plugin that creates txt list based on the phone number entered on registration. The plugin JOYOFTXT has a setting so you can tell it the metakey that you phonenumber is in for example here are the common ones it suggest billing_phone
jot_profile_phonenumber
phone
phone_number
profile_mobile1
shipping_phoneso problem is buddypress doesnt store its metadata in any of those so you plugin would be perfect only issue it doesnt allow syncing to a custom metakey like phone –> jot_profile_phonenumber
I almost found a solution with some tinkering with the code in bp2wp-full-sync.php
public static $wpfields = array(
‘first_name’ => ‘pre_user_first_name’,
‘last_name’ => ‘pre_user_last_name’,
‘description’ => ‘pre_user_description’,
‘user_url’ => ‘pre_user_url’,
‘locale’ => ‘pre_user_locale’————————
I couldn’t add a extra option it errored out if I tried but im not a coder so might be easy but I was able to change a preexisting one so I edited the above to:
public static $wpfields = array(
‘first_name’ => ‘pre_user_first_name’,
‘last_name’ => ‘pre_user_last_name’,
‘description’ => ‘pre_user_description’,
‘user_url’ => ‘pre_user_url’,
‘phone’ => ‘pre_user_phone’,that works perfect im then able to chose to sync the buddypress phone field to the wordpress phone field JOYOFTXT creates, only thing its not letting me do is metas with multiple names like ideally I want to use jot_profile_phonenumber as thats where 1000 + numbers are stored. If I try ‘phone’ => ‘pre_user_ jot_profile_phonenumber ‘, it only seems to recognize the last part so it tries to sync to _phonenumber and ignores the jot_profile_ part before hand. ‘phone’ => ‘pre_user_phone’, works perfect though i would jsut prefer the jot_profile_phonenumber meta instead. It also doesnt seem to sync backwards. If I change the phone number in buddyress profile it auto changes it in the WP profile perfect but if I change it in the wordpress profile and click save it doesnt update so maybe im missing something else i need to change in the code?
- The topic ‘Snyc to Phone field’ is closed to new replies.