WPJM_SUBMITRESUME::resume_manager_resume_submitted( $resume_id )


Parameters Parameters

$fields

(Required)


Source Source

File: src/integrations/wp-job-manager/triggers/wpjm-submitresume.php

	public function resume_manager_resume_submitted( $resume_id ) {



		if ( empty( $resume_id ) ) {
			return;
		}
		$user_id      = get_current_user_id();
		$trigger_args = [
			'code'           => $this->trigger_code,
			'meta'           => $this->trigger_meta,
			'post_id'        => intval( $resume_id ),
			'ignore_post_id' => true,
			'user_id'        => $user_id,
		];

		$args = Automator()->maybe_add_trigger_entry( $trigger_args, false );

		if ( $args ) {
			foreach ( $args as $result ) {
				if ( true === $result['result'] ) {
					$trigger_meta = [
						'user_id'        => $user_id,
						'trigger_id'     => $result['args']['trigger_id'],
						'trigger_log_id' => $result['args']['get_trigger_id'],
						'run_number'     => $result['args']['run_number'],
					];

					$trigger_meta['meta_key']   = $this->trigger_code;
					$trigger_meta['meta_value'] = $resume_id;
					Automator()->insert_trigger_meta( $trigger_meta );
					Automator()->maybe_trigger_complete( $result['args'] );
					break;
				}
			}
		}
	}