Wpwh_Tokens::get_form_data_from_trigger_meta( $meta_key,  $trigger_id,  $trigger_log_id )


Parameters Parameters

$meta_key

(Required)

$trigger_id

(Required)


Top ↑

Return Return

(mixed|string)


Source Source

File: src/integrations/wp-webhooks/tokens/wpwh-tokens.php

	public function get_form_data_from_trigger_meta( $meta_key, $trigger_id, $trigger_log_id ) {
		global $wpdb;
		if ( empty( $meta_key ) || empty( $trigger_id ) ) {
			return '';
		}

		$meta_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->prefix}uap_trigger_log_meta WHERE meta_key = %s AND automator_trigger_id = %d AND automator_trigger_log_id = %d ORDER BY ID DESC LIMIT 0,1", $meta_key, $trigger_id, $trigger_log_id ) );
		if ( ! empty( $meta_value ) ) {
			return maybe_unserialize( $meta_value );
		}

		return '';
	}