Email_Abstract::get_subject()

Get the subject of the email.


Return

(string)


Top ↑

Source

File: src/Tickets/Emails/Email_Abstract.php

	public function get_subject(): string {
		$option_key = $this->get_option_key( 'subject' );
		$subject    = tribe_get_option( $option_key, $this->get_default_subject() );

		// @todo: Probably we want more data parsed, or maybe move the filters somewhere else as we're always gonna

		/**
		 * Allow filtering the email subject globally.
		 *
		 * @since 5.5.10
		 *
		 * @param string         $subject  The email subject.
		 * @param string         $id       The email id.
		 * @param string         $template Template name.
		 * @param Email_Abstract $this     The email object.
		 */
		$subject = apply_filters( 'tec_tickets_emails_subject', $subject, $this->id, $this->template, $this );

		/**
		 * Allow filtering the email subject.
		 *
		 * @since 5.5.10
		 *
		 * @param string         $subject  The email subject.
		 * @param string         $id       The email id.
		 * @param string         $template Template name.
		 * @param Email_Abstract $this     The email object.
		 */
		$subject = apply_filters( "tec_tickets_emails_{$this->slug}_subject", $subject, $this->id, $this->template, $this );

		return $this->format_string( $subject );
	}

Top ↑

Changelog

Changelog
Version Description
5.5.10 Introduced.