Use the following hook implementation to update post author after claim.
Usage:
add_action( "owf_claim_action", "update_post_author", 10, 2 );
Parameters:
$action_histories : array of action histories for the claim action.
$new_history_id : new history id created after the claim action.
Example:
add_action( "owf_claim_action", "update_post_author", 10, 2 );
function update_post_author( $action_histories, $new_history_id ) {
global $wpdb;
$ow_history_service = new OW_History_Service();
$claimed_post_history = $ow_history_service->get_action_history_by_id( $new_history_id );
// Get post id and assigned task user.
$post_id = $claimed_post_history->post_id;
$post_claimed_user = $claimed_post_history->assign_actor_id;
// update the post author here
}
Source Code
The filter is located in class-ow-process-flow.php.
Didn't find what you are looking for? Submit a Query
Hooks and FiltersAdding Custom Fields to Publish Step
Hooks and FiltersAdding Custom Fields to Publish Step