get_prev_job_data( $rid ); $prev_translation = []; $prev_job = $this->get_translation_job( $prev_job_id ); /** @var stdClass $prev_job */ if ( isset( $prev_job->original_doc_id ) ) { foreach ( $prev_job->elements as $element ) { $prev_translation[ $element->field_type ] = new WPML_TM_Translated_Field( $element->field_data, $element->field_data_translated, $element->field_finished ); } } return apply_filters( 'wpml_tm_populate_prev_translation', $prev_translation, $package, $this->get_lang_by_rid( $rid ) ); } }