$schedule_name
$schedule_name : string
Push data from WordPress into Salesforce
__construct(object $wpdb, string $version, array $login_credentials, string $slug, object $wordpress, object $salesforce, object $mappings, object $logging, array $schedulable_classes, object $queue = '', string $option_prefix = '')
Constructor which sets up push schedule
| object | $wpdb | |
| string | $version | |
| array | $login_credentials | |
| string | $slug | |
| object | $wordpress | |
| object | $salesforce | |
| object | $mappings | |
| object | $logging | |
| array | $schedulable_classes | |
| object | $queue | |
| string | $option_prefix |
add_actions()
Create the action hooks based on what object maps exist from the admin settings.
We do not have any actions for blogroll at this time.
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jstegall/Sites/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293manual_push(string $object_type, integer $wordpress_id, string $http_method)
Method for ajax hooks to call for pushing manually
| string | $object_type | |
| integer | $wordpress_id | |
| string | $http_method |
add_user(string $user_id)
Callback method for adding a user
| string | $user_id |
um_add_user(string $user_id, $form_data = array())
Callback method for adding a user via the Ultimate Member plugin
| string | $user_id | |
| $form_data |
edit_user(string $user_id, object $old_user_data)
Callback method for editing a user
| string | $user_id | |
| object | $old_user_data |
delete_user(string $user_id)
Callback method for deleting a user
| string | $user_id |
post_actions(string $post_id, object $post)
Callback method for posts of any type This can handle create, update, and delete actions
| string | $post_id | |
| object | $post |
add_attachment(string $post_id)
Callback method for adding an attachment
| string | $post_id |
edit_attachment(string $post_id)
Callback method for editing an attachment
| string | $post_id |
delete_attachment(string $post_id)
Callback method for editing an attachment
| string | $post_id |
add_term(string $term_id, string $tt_id, string $taxonomy)
Callback method for adding a term
| string | $term_id | |
| string | $tt_id | |
| string | $taxonomy |
edit_term(string $term_id, string $taxonomy)
Callback method for editing a term
| string | $term_id | |
| string | $taxonomy |
delete_term(integer $term, $tt_id, string $taxonomy, object $deleted_term)
Callback method for deleting a term
| integer | $term | (id) |
| $tt_id | ||
| string | $taxonomy | (slug) |
| object | $deleted_term |
add_comment(string $comment_id, $comment_approved, array $commentdata = array())
Callback method for adding a comment
| string | $comment_id | |
| $comment_approved | ||
| array | $commentdata |
edit_comment(string $comment_id)
Callback method for editing a comment
| string | $comment_id |
delete_comment(string $comment_id)
Callback method for deleting a comment
| string | $comment_id |
salesforce_push_sync_rest(string $object_type, $object, $mapping, integer $sf_sync_trigger) : true
Sync WordPress objects and Salesforce objects using the REST API.
| string | $object_type | Type of WordPress object. |
| $object | ||
| $mapping | ||
| integer | $sf_sync_trigger | Trigger for this sync. |
or exit the method
object_insert( $object, $type)
Insert a new object This calls the overall push crud method, which controls queuing and sending data to the Salesforce class
| $object | ||
| $type |
object_update( $object, $type)
Update an existing object This calls the overall push crud method, which controls queuing and sending data to the Salesforce class
| $object | ||
| $type |
object_delete( $object, $type)
Delete an existing object This calls the overall push crud method, which controls queuing and sending data to the Salesforce class
| $object | ||
| $type |
salesforce_push_object_crud(string $object_type, array $object, integer $sf_sync_trigger, boolean $manual = false)
Push objects to Salesforce.
This method decides whether to do the processing immediately or queue it to the schedule class (or skip it based on another plugin's activity)
| string | $object_type | Type of WordPress object. |
| array | $object | The WordPress data that needs to be sent to Salesforce. |
| integer | $sf_sync_trigger | The trigger being responded to. |
| boolean | $manual | Are we calling this manually? |
create_object_map(array $wordpress_object, string $id_field_name, string $salesforce_id, array $field_mapping, $pending = false) : integer
Create an object map between a WordPress object and a Salesforce object
| array | $wordpress_object | Array of the WordPress object's data |
| string | $id_field_name | How this object names its primary field. ie Id or comment_id or whatever |
| string | $salesforce_id | Unique identifier for the Salesforce object |
| array | $field_mapping | The row that maps the object types together, including which fields match which other fields |
| $pending |
$wpdb->insert_id This is the database row for the map object
is_push_allowed( $object_type, array $object, string $sf_sync_trigger, array $mapping, array $map_sync_triggers) : boolean
Find out if push is allowed for this record
| $object_type | ||
| array | $object | Array of the WordPress object's data |
| string | $sf_sync_trigger | The current operation's trigger |
| array | $mapping | the fieldmap that maps the two object types |
| array | $map_sync_triggers |
$push_allowed Whether all this stuff allows the $api_result to be pushed to Salesforce