Automattic\WooCommerce\EmailEditor\Engine
Send_Preview_Email::get_preview_email_subject
Get the subject of the preview email.
Method of the class: Send_Preview_Email{}
Hooks from the method
Returns
String.
Usage
$Send_Preview_Email = new Send_Preview_Email(); $Send_Preview_Email->get_preview_email_subject( $post ): string;
- $post(WP_Post) (required)
- The WordPress post object.
Send_Preview_Email::get_preview_email_subject() Send Preview Email::get preview email subject code WC 10.8.1
public function get_preview_email_subject( $post ): string {
/**
* Filters the subject of the preview email before it is sent or rendered.
*
* @param string $subject The email subject, defaults to the post title.
* @param \WP_Post $post The email post object.
*
* @since 2.9.0
*/
$subject = (string) apply_filters( 'woocommerce_email_editor_send_preview_email_subject', $post->post_title, $post );
return $subject;
}