christianwach / civicrm-wp-profile-sync

Keeps a WordPress User profile in sync with a CiviCRM Contact and integrates WordPress and CiviCRM Entities with data synced via Advanced Custom Fields.
https://wordpress.org/plugins/civicrm-wp-profile-sync/
GNU General Public License v2.0
13 stars 17 forks source link

Overhaul custom field sync for BuddyPress #51

Open MegaphoneJon opened 1 year ago

MegaphoneJon commented 1 year ago

Hi Christian,

This is a PR to fix/overhaul the custom field sync choices for BuddyPress/xProfile.

The primary benefit is that this conforms to modern Civi custom field structure. E.g. the value of serialize determines whether a field is multi-select or not - and the "Select Country" etc. no longer exist as HTML types.

I also saw that a radio field in Civi would only map to a radio field, and not a select field. I'm not sure if there's a specific reason for that? In Webform-CiviCRM, I commonly change the front-end UI of a field, so I loosened all of that up.

I also added support for syncing with Boolean fields.

This allowed me to remove a whole lot of code - and we can probably go further, but I wanted to see if these changes were broadly acceptable to you.

christianwach commented 1 year ago

@danaskallman IIRC you have a site running this sync - is there any chance you could test this on your dev install for it?

christianwach commented 1 year ago

@MegaphoneJon Thanks for this. The PR looks quite substantial and I don't have a site that uses this sync at present... so please bear with me... reviewing this is going to take time.

danaskallman commented 1 year ago

@christianwach I don't have that site anymore, unfortunately.

MegaphoneJon commented 9 months ago

@christianwach - is anyone but me using BuddyPress sync? @danaskallman isn't, and it can only be activated by an undocumented flag in wp-config.php.

Given that, perhaps the threshold for testing can be lowered? In addition to the 1 hour I pledged, I can spin up a server with an anonymized instance of my client site and give you root, if that would help.