@danatpi yes, there are two ways of doing that.
1. You can create a Salesforce field called status, give it a value of “publish” and sync it over to the post_status field in WordPress.
2. You can use a developer hook in a theme or plugin. The relevant hook works like this:
add_filter( ‘object_sync_for_salesforce_pull_params_modify’,’change_publish_status’, 10, 6 );
function change_publish_status( $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;
}
-
This reply was modified 5 years, 5 months ago by
Jonathan Stegall. Reason: it might not be in a class