AMELIABOOKING_TOKENS::fetch_service_name( $service_id )

Fetch the service name.


Parameters Parameters

$service_id

(Required)


Top ↑

Return Return

(string)


Source Source

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

	public function fetch_service_name( $service_id ) {

		global $wpdb;

		$service_name = '';

		$service = $wpdb->get_row(
			$wpdb->prepare(
				"SELECT name, id from {$wpdb->prefix}amelia_services WHERE id = %d",
				$service_id
			)
		);

		if ( isset( $service->name ) ) {
			$service_name = $service->name;
		}

		return $service_name;

	}