Add missing # before order numbers and escape properly
This commit is contained in:
parent
d7cb15c8f8
commit
5f7b833844
|
@ -70,9 +70,9 @@ if ( ! class_exists( 'WC_Email_Customer_Refunded_Order', false ) ) :
|
||||||
*/
|
*/
|
||||||
public function get_default_subject( $partial = false ) {
|
public function get_default_subject( $partial = false ) {
|
||||||
if ( $partial ) {
|
if ( $partial ) {
|
||||||
return __( 'Your {site_title} order {order_number} has been partially refunded', 'woocommerce' );
|
return __( 'Your {site_title} order #{order_number} has been partially refunded', 'woocommerce' );
|
||||||
} else {
|
} else {
|
||||||
return __( 'Your {site_title} order {order_number} has been refunded', 'woocommerce' );
|
return __( 'Your {site_title} order #{order_number} has been refunded', 'woocommerce' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ if ( ! class_exists( 'WC_Email_Failed_Order', false ) ) :
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_default_heading() {
|
public function get_default_heading() {
|
||||||
return __( 'Order Failed: {order_number}', 'woocommerce' );
|
return __( 'Order Failed: #{order_number}', 'woocommerce' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -49,7 +49,7 @@ 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 );
|
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<?php esc_html_e( 'Hopefully they’ll be back. Read more about <a href="https://docs.woocommerce.com/document/managing-orders/#section-10">troubleshooting failed payments</a>.', 'woocommerce' ); ?>
|
<?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>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||||
|
|
||||||
<?php /* translators: %s: Customer first name */ ?>
|
<?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( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||||
<?php /* translators: %s: Site title */ ?>
|
<?php /* translators: %s: Site title */ ?>
|
||||||
<p><?php printf( __( 'Your %s order has been marked complete on our side. We hope you enjoy it!', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ); ?></p><?php // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
|
<p><?php printf( esc_html__( 'Your %s order has been marked complete on our side.', 'woocommerce' ), esc_html( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -51,7 +51,7 @@ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<?php _e( 'Thanks for shopping with us.', 'woocommerce' ); // phpcs:ignore WordPress.XSS.EscapeOutput ?>
|
<?php esc_html_e( 'Thanks for shopping with us.', 'woocommerce' ); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '= ' . $email_heading . " =\n\n"; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
echo '= ' . esc_html( $email_heading ) . " =\n\n";
|
||||||
|
|
||||||
/* translators: %s: Customer first name */
|
/* translators: %s: Customer first name */
|
||||||
printf( __( 'Hi %s,', 'woocommerce' ), $order->get_billing_first_name() ) . "\n\n"; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
|
||||||
/* translators: %s: Site title */
|
/* translators: %s: Site title */
|
||||||
printf( __( 'Your %s order has been marked complete on our side. We hope you enjoy it!', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) . "\n\n"; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
echo sprintf( esc_html__( 'Your %s order has been marked complete on our side.', 'woocommerce' ), esc_html( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) ) . "\n\n";
|
||||||
|
|
||||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||||
|
|
||||||
|
@ -49,12 +49,8 @@ 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 );
|
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||||
|
|
||||||
?>
|
echo esc_html__( 'Thanks for shopping with us.', 'woocommerce' ) . "\n\n";
|
||||||
<p>
|
|
||||||
<?php _e( 'Thanks for shopping with us.', 'woocommerce' ); // phpcs:ignore WordPress.XSS.EscapeOutput ?>
|
|
||||||
</p>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||||
|
|
||||||
echo apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
echo esc_html( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||||
|
|
Loading…
Reference in New Issue