Flsupport_Tokens::get_ticket_object( $ticket_id )


Source Source

File: src/integrations/fluent-support/tokens/flsupport-tokens.php

	protected function get_ticket_object( $ticket_id ) {
		$ticket_id = absint( $ticket_id );
		$ticket    = \FluentSupport\App\Models\Ticket::find( $ticket_id );
		if ( $ticket->product_id ) {
			$ticket->load( 'product' );
		}
		$ticket->admin_url = admin_url( "admin.php?page=fluent-support#/tickets/{$ticket_id}/view" );
		return $ticket;
	}