How to add a custom wordpress object
-
Hello, I’m hoping for a bit of direction regarding the addobject/addfield hooks in the plugin.
Right now I have custom table in wordpress. with 2 fields. I have the correspondign object in SF.
my_table
field_a | field_bI added the object to the wordpress object drop down. Which works fine:
add_filter( 'object_sync_for_salesforce_add_more_wordpress_types', 'add_more_types', 10, 1 ); function add_more_types( $more_types ) { $more_types = array( 'my_table' ); // or $more_types[] = 'foo'; return $more_types; }
however. I cannot seem to get the field list to filter:
add_filter( 'object_sync_for_salesforce_wordpress_object_fields', 'add_field', 10, 2 ); function add_field( $object_fields, $wordpress_object ) { $object_fields[] = array( 'key' => 'field_a', 'table' => 'my_table', 'methods' => array ( 'create' => 'arc_sub_create', 'read' => 'arc_sub_read', 'update' => 'arc_sub_update', 'delete' => 'arc_sub_delete' ) ); return $object_fields; }
Any direction is greatly appreciated.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to add a custom wordpress object’ is closed to new replies.