woocommerce_mail_content

woocommerce_mail_content

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_mail_content') is found 2 times:

  • /includes/admin/class-wc-admin.php line 218
    			// create a new email.
    			$email = new WC_Email();
    
    			// wrap the content with the email template and then add styles.
    			$message = apply_filters( 'woocommerce_mail_content', $email->style_inline( $mailer->wrap_message( $email_heading, $message ) ) );
    
    			// print the preview email.
    			// phpcs:ignore WordPress.Security.EscapeOutput
    			echo $message;
    			// phpcs:enable
    			exit;
    
  • /includes/emails/class-wc-email.php line 701
    		add_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
    		add_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
    		add_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
    
    		$message              = apply_filters( 'woocommerce_mail_content', $this->style_inline( $message ) );
    		$mail_callback        = apply_filters( 'woocommerce_mail_callback', 'wp_mail', $this );
    		$mail_callback_params = apply_filters( 'woocommerce_mail_callback_params', array( $to, wp_specialchars_decode( $subject ), $message, $headers, $attachments ), $this );
    		$return               = $mail_callback( ...$mail_callback_params );
    
    		remove_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
    		remove_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );