WC_Email::get_subject
Get email subject.
Метод класса: WC_Email{}
Хуки из метода
Возвращает
Строку.
Использование
$WC_Email = new WC_Email(); $WC_Email->get_subject();
Код WC_Email::get_subject() WC Email::get subject WC 10.5.2
public function get_subject() {
/**
* Provides an opportunity to inspect and modify subject for the email.
*
* @since 2.0.0
*
* @param string $subject Subject 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.
*/
$subject = apply_filters( 'woocommerce_email_subject_' . $this->id, $this->format_string( $this->get_option_or_transient( 'subject', $this->get_default_subject() ) ), $this->object, $this );
if ( $this->block_email_editor_enabled ) {
// Because the new email editor uses rich-text component for subject editing, to be ensure that the subject is always in plain text, we need to strip all tags.
$subject = wp_strip_all_tags( $this->personalizer->personalize_transactional_content( $subject, $this ) );
}
return $subject;
}