Automator_Send_Webhook::get_url( $data, bool $legacy = false, array $parsed_args = array() )

Get outgoing URL


Parameters Parameters

$data

(Required)

$legacy

(Optional)

Default value: false

$parsed_args

(Optional)

Default value: array()


Top ↑

Return Return

(string|null)


Source Source

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

	public function get_url( $data, $legacy = false, $parsed_args = array() ) {
		if ( $legacy ) {
			return esc_url_raw( isset( $data['WEBHOOKURL'] ) ? $this->maybe_parse_tokens( $data['WEBHOOKURL'], $parsed_args ) : '' );
		}

		return esc_url_raw( isset( $data['WEBHOOK_URL'] ) ? $this->maybe_parse_tokens( $data['WEBHOOK_URL'], $parsed_args ) : '' );
	}