Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Automator_Send_Webhook::prepare_legacy_fields( $data, array $parsing_args = array() )

Legacy data. Used in v1~2.1 of Pro


Parameters Parameters

$data

(Required)

$parsing_args

(Optional)

Default value: array()


Top ↑

Return Return

(array)


Source Source

File: src/core/lib/webhooks/class-automator-send-webhook.php

	private function prepare_legacy_fields( $data, $parsing_args = array() ) {
		$key_values     = array();
		$number_of_keys = 7;
		for ( $i = 1; $i <= $number_of_keys; $i ++ ) {
			$key                = $this->maybe_parse_tokens( $data[ 'KEY' . $i ], $parsing_args );
			$value              = $this->maybe_parse_tokens( $data[ 'VALUE' . $i ], $parsing_args );
			$key_values[ $key ] = $value;
		}

		return $key_values;
	}