WC_Email::get_preheaderpublicWC 1.0

Get email preheader.

Method of the class: WC_Email{}

Hooks from the method

Returns

String.

Usage

$WC_Email = new WC_Email();
$WC_Email->get_preheader();

WC_Email::get_preheader() code WC 10.7.0

public function get_preheader() {
	/**
	 * Provides an opportunity to inspect and modify preheader for the email.
	 *
	 * @since 9.9.0
	 *
	 * @param string      $preheader Preheader of the email.
	 * @param object|bool $object  The object (ie, product or order) this email relates to, if any.
	 * @param WC_Email    $email   WC_Email instance managing the email.
	 */
	$preheader = apply_filters( 'woocommerce_email_preheader' . $this->id, $this->format_string( $this->get_option_or_transient( 'preheader', '' ) ), $this->object, $this );
	if ( $this->block_email_editor_enabled ) {
		$preheader = $this->personalizer->personalize_transactional_content( $preheader, $this );
	}
	return $preheader;
}