Created
May 18, 2020 20:26
-
-
Save jonathanstegall/5919e8dcf333336d625f8d87a870dcf5 to your computer and use it in GitHub Desktop.
developer hook to set a post status using object sync for salesforce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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