Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanstegall/5919e8dcf333336d625f8d87a870dcf5 to your computer and use it in GitHub Desktop.
Save jonathanstegall/5919e8dcf333336d625f8d87a870dcf5 to your computer and use it in GitHub Desktop.
developer hook to set a post status using object sync for salesforce
<?php
add_filter( 'object_sync_for_salesforce_pull_params_modify', 'change_pull_params', 10, 6 );
function change_pull_params( $params, $mapping, $object, $sf_sync_trigger, $use_soap, $is_new ) {
$params['post_status'] = array(
'value' => 'publish',
'method_modify' => 'wp_update_post',
'method_read' => 'get_post',
);
return $params;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment