Add content to html emails
This commit is contained in:
parent
17a4c6e28a
commit
f41070f91e
|
@ -48,6 +48,13 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additonal content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.5.0
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -47,11 +47,13 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
?>
|
||||
<p>
|
||||
<?php echo wp_kses_post( __( 'Hopefully they’ll be back. Read more about <a href="https://docs.woocommerce.com/document/managing-orders/#section-10">troubleshooting failed payments</a>.', 'woocommerce' ) ); ?>
|
||||
</p>
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Show user-defined additonal content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails/HTML
|
||||
* @version 3.5.0
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer billing full name */ ?>
|
||||
<p><?php printf( __( 'You’ve received the following order from %s:', 'woocommerce' ), $order->get_formatted_billing_full_name() ); ?></p><?php // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
|
||||
<p><?php printf( __( 'You’ve received the following order from %s:', 'woocommerce' ), $order->get_formatted_billing_full_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
<?php
|
||||
|
||||
/*
|
||||
|
@ -47,6 +47,13 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additonal content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.5.0
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -49,11 +49,12 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
?>
|
||||
<p>
|
||||
<?php esc_html_e( 'Thanks for shopping with us.', 'woocommerce' ); ?>
|
||||
</p>
|
||||
<?php
|
||||
/**
|
||||
* Show user-defined additonal content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
|
|
|
@ -83,6 +83,13 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additonal content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the email footer.
|
||||
*
|
||||
|
|
|
@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php /* translators: %s Customer username */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
|
||||
<?php /* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */ ?>
|
||||
<p><?php printf( __( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), '<strong>' . esc_html( $user_login ) . '</strong>', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); ?></p><?php // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
|
||||
<p><?php printf( __( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), '<strong>' . esc_html( $user_login ) . '</strong>', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && $password_generated ) : ?>
|
||||
<?php /* translators: %s Auto generated password */ ?>
|
||||
|
|
|
@ -28,7 +28,7 @@ do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
|||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
<p><?php esc_html_e( 'The following note has been added to your order:', 'woocommerce' ); ?></p>
|
||||
|
||||
<blockquote><?php echo wpautop( wptexturize( make_clickable( $customer_note ) ) ); ?></blockquote><?php // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
|
||||
<blockquote><?php echo wpautop( wptexturize( make_clickable( $customer_note ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></blockquote>
|
||||
|
||||
<p><?php esc_html_e( 'As a reminder, here are your order details:', 'woocommerce' ); ?></p>
|
||||
|
||||
|
@ -53,6 +53,13 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additonal content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.5.0
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -25,8 +25,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( __( 'Hi %s,', 'woocommerce' ), $order->get_billing_first_name() ); ?></p><?php // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
|
||||
<p><?php _e( 'Thanks for your order. It’s on-hold until we confirm that payment has been received. In the meantime, here’s a reminder of what you ordered:', 'woocommerce' ); ?></p><?php // phpcs:ignore WordPress.XSS.EscapeOutput ?>
|
||||
<p><?php printf( __( 'Hi %s,', 'woocommerce' ), $order->get_billing_first_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
<p><?php esc_html_e( 'Thanks for your order. It’s on-hold until we confirm that payment has been received. In the meantime, here’s a reminder of what you ordered:', 'woocommerce' ); ?></p>
|
||||
|
||||
<?php
|
||||
|
||||
|
@ -49,11 +49,12 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
?>
|
||||
<p>
|
||||
<?php _e( 'We look forward to fulfilling your order soon.', 'woocommerce' ); // phpcs:ignore WordPress.XSS.EscapeOutput ?>
|
||||
</p>
|
||||
<?php
|
||||
/**
|
||||
* Show user-defined additonal content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.5.4
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -50,11 +50,12 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
?>
|
||||
<p>
|
||||
<?php esc_html_e( 'Thanks!', 'woocommerce' ); ?>
|
||||
</p>
|
||||
<?php
|
||||
/**
|
||||
* Show user-defined additonal content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates/Emails
|
||||
* @version 3.5.0
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( __( 'Hi %s,', 'woocommerce' ), $order->get_billing_first_name() ); ?></p><?php // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
|
||||
<p><?php printf( __( 'Hi %s,', 'woocommerce' ), $order->get_billing_first_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
|
@ -59,11 +59,12 @@ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text,
|
|||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
?>
|
||||
<p>
|
||||
<?php _e( 'We hope to see you again soon.', 'woocommerce' ); // phpcs:ignore WordPress.XSS.EscapeOutput ?>
|
||||
</p>
|
||||
<?php
|
||||
/**
|
||||
* Show user-defined additonal content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
|
|
|
@ -36,4 +36,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
</a>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_email_footer', $email ); ?>
|
||||
<?php
|
||||
/**
|
||||
* Show user-defined additonal content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
|
|
Loading…
Reference in New Issue