Automator_DB_Handler_Actions::get_meta( $action_log_id,  $meta_key )


Parameters Parameters

$action_log_id

(Required)

$meta_key

(Required)


Top ↑

Return Return

(string)


Source Source

File: src/core/lib/utilities/db/class-automator-db-handler-actions.php

	public function get_meta( int $action_log_id, string $meta_key ) {
		global $wpdb;
		$table_name = $wpdb->prefix . Automator()->db->tables->action_meta;
		$result     = $wpdb->get_row( $wpdb->prepare( "SELECT meta_value FROM $table_name WHERE meta_key =%s AND automator_action_log_id =%d", $meta_key, $action_log_id ) ); //phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared

		if ( ! $result ) {
			return $result;
		}

		return $result->meta_value;
	}