get_translation_job( $job_id ); $new_status = (int) $new_status; $old_status = (int) $job->status; if ( $new_status !== $old_status ) { wpml_tm_get_records() ->icl_translation_status_by_translation_id( $job->translation_id ) ->update( array( 'status' => $new_status ) ); } } }