PeepSo_Tokens::get_token_value( $pieces = array() )


Parameters Parameters

$pieces

(Optional)

Default value: array()


Top ↑

Return Return

(mixed)


Source Source

File: src/integrations/peepso/tokens/peepso-tokens.php

	public function get_token_value( $pieces = array() ) {
		$meta_field = $pieces[2];
		$trigger_id = absint( $pieces[0] );
		$meta_value = $this->get_form_data_from_trigger_meta( $meta_field, $trigger_id );

		if ( is_array( $meta_value ) ) {
			$value = join( ', ', $meta_value );
		} else {
			$value = $meta_value;
		}

		return $value;
	}