woocommerce_email_editor_send_preview_email_before_wp_mail

woocommerce_email_editor_send_preview_email_before_wp_mail

Appears in:
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.10.6.1

do_action('woocommerce_email_editor_send_preview_email_before_wp_mail') is found 1 times:

  • /packages/email-editor/src/Engine/class-send-preview-email.php line 150
    	 * @param string $body The body content of the email.
    	 * @return bool Returns true if the email was sent successfully, false otherwise.
    	 */
    	public function send_email( string $to, string $subject, string $body ): bool {
    		do_action( 'woocommerce_email_editor_send_preview_email_before_wp_mail', $to, $subject, $body );
    
    		add_filter( 'wp_mail_content_type', array( $this, 'set_mail_content_type' ) );
    
    		$result = wp_mail( $to, $subject, $body );
    
    		// Reset content-type to avoid conflicts.
    

See this hook used in plugins: