Properties

$schedule_name

$schedule_name : string

Type

string

$wpdb

$wpdb : 

Type

$version

$version : 

Type

$login_credentials

$login_credentials : 

Type

$slug

$slug : 

Type

$salesforce

$salesforce : 

Type

$mappings

$mappings : 

Type

$logging

$logging : 

Type

$schedulable_classes

$schedulable_classes : 

Type

$queue

$queue : 

Type

$option_prefix

$option_prefix : 

Type

Methods

__construct()

__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

Parameters

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

Throws

\Object_Sync_Sf_Exception

add_actions()

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 1293

manual_push()

manual_push(string  $object_type, integer  $wordpress_id, string  $http_method) 

Method for ajax hooks to call for pushing manually

Parameters

string $object_type
integer $wordpress_id
string $http_method
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 1293

add_user()

add_user(string  $user_id) 

Callback method for adding a user

Parameters

string $user_id
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 1293

um_add_user()

um_add_user(string  $user_id,   $form_data = array()) 

Callback method for adding a user via the Ultimate Member plugin

Parameters

string $user_id
$form_data
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 1293

edit_user()

edit_user(string  $user_id, object  $old_user_data) 

Callback method for editing a user

Parameters

string $user_id
object $old_user_data
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 1293

delete_user()

delete_user(string  $user_id) 

Callback method for deleting a user

Parameters

string $user_id
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 1293

post_actions()

post_actions(string  $post_id, object  $post) 

Callback method for posts of any type This can handle create, update, and delete actions

Parameters

string $post_id
object $post
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 1293

add_attachment()

add_attachment(string  $post_id) 

Callback method for adding an attachment

Parameters

string $post_id
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 1293

edit_attachment()

edit_attachment(string  $post_id) 

Callback method for editing an attachment

Parameters

string $post_id
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 1293

delete_attachment()

delete_attachment(string  $post_id) 

Callback method for editing an attachment

Parameters

string $post_id
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 1293

add_term()

add_term(string  $term_id, string  $tt_id, string  $taxonomy) 

Callback method for adding a term

Parameters

string $term_id
string $tt_id
string $taxonomy
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 1293

edit_term()

edit_term(string  $term_id, string  $taxonomy) 

Callback method for editing a term

Parameters

string $term_id
string $taxonomy
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 1293

delete_term()

delete_term(integer  $term,   $tt_id, string  $taxonomy, object  $deleted_term) 

Callback method for deleting a term

Parameters

integer $term

(id)

$tt_id
string $taxonomy

(slug)

object $deleted_term
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 1293

add_comment()

add_comment(string  $comment_id,   $comment_approved, array  $commentdata = array()) 

Callback method for adding a comment

Parameters

string $comment_id
$comment_approved
array $commentdata
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 1293

edit_comment()

edit_comment(string  $comment_id) 

Callback method for editing a comment

Parameters

string $comment_id
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 1293

delete_comment()

delete_comment(string  $comment_id) 

Callback method for deleting a comment

Parameters

string $comment_id
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 1293

salesforce_push_sync_rest()

salesforce_push_sync_rest(string  $object_type,   $object,   $mapping, integer  $sf_sync_trigger) : true

Sync WordPress objects and Salesforce objects using the REST API.

Parameters

string $object_type

Type of WordPress object.

$object
$mapping
integer $sf_sync_trigger

Trigger for this sync.

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 1293

Returns

true —

or exit the method

object_insert()

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

Parameters

$object
$type
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 1293

object_update()

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

Parameters

$object
$type
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 1293

object_delete()

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

Parameters

$object
$type
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 1293

salesforce_push_object_crud()

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)

Parameters

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?

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 1293

create_object_map()

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

Parameters

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
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 1293

Returns

integer —

$wpdb->insert_id This is the database row for the map object

is_push_allowed()

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

Parameters

$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
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 1293

Returns

boolean —

$push_allowed Whether all this stuff allows the $api_result to be pushed to Salesforce