Pull from Salesforce to WordPress ACF Fields
-
First, really helpful and well-documented plugin so far. Thanks for putting the time in on this!
I’m attempting to pull somewhere between 20-40 fields from Salesforce into a WordPress custom post type that has corresponding meta fields created with the Advanced Custom Fields plugin. So I’m wondering about two things:
a) I can map the fields in your plugin backend, but it feels a little tedious. What’s the most efficient way to add all the fields that also lets me easily add and remove fields in the future? I see the object_sync_for_salesforce_pull_params_modify hook, but does it require I know the exact field name from Salesforce?
b) ACF has it’s own function to save/update meta fields (https://www.advancedcustomfields.com/resources/update_field/). I see that I can change the save function for a mapped item, but 1) ACF’s update_field() function has parameters and I don’t know if your plugin passes parameters when calling the supplied update function, and 2) Even if your plugin used parameters, they are not in the same order, ie,
update_field($selector, $value, $post_id)
whileupdate_post_meta( $post_id, $meta_key, $meta_value, $prev_value )
. Would I need to create my own function to call update_field that reorders the parameters? And where would that function live, in my theme’s functions.php file?Thanks for the help!
- The topic ‘Pull from Salesforce to WordPress ACF Fields’ is closed to new replies.