From 87fd8b2febcf6c4fe09d293dd143f1fb2d7c0223 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 12 Dec 2017 16:38:50 +0000 Subject: [PATCH] Update pay link wording --- templates/emails/customer-invoice.php | 14 +++++++------- templates/emails/plain/customer-invoice.php | 18 +++++++++++++++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/templates/emails/customer-invoice.php b/templates/emails/customer-invoice.php index 5166b632347..5a634388fda 100644 --- a/templates/emails/customer-invoice.php +++ b/templates/emails/customer-invoice.php @@ -33,7 +33,7 @@ do_action( 'woocommerce_email_header', $email_heading, $email ); ?> printf( wp_kses( /* translators: %1s item is the name of the site, %2s is a html link */ - __( 'An order has been created for you on %1$s. To pay for this order please use the following link: %2$s', 'woocommerce' ), + __( 'An order has been created for you on %1$s. %2$s', 'woocommerce' ), array( 'a' => array( 'href' => array(), @@ -41,16 +41,16 @@ do_action( 'woocommerce_email_header', $email_heading, $email ); ?> ) ), esc_html( get_bloginfo( 'name', 'display' ) ), - '' . esc_html__( 'Submit payment online.', 'woocommerce' ) . '' + '' . esc_html__( 'Pay for this order', 'woocommerce' ) . '' ); ?> -

+

do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); /** - * Hook for the woocommerce_email_order_meta + * Hook for the woocommerce_email_order_meta. * * @hooked WC_Emails::order_meta() Shows order meta data. */ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); /** - * Hook for woocommerce_email_customer_details + * Hook for woocommerce_email_customer_details. * * @hooked WC_Emails::customer_details() Shows customer details * @hooked WC_Emails::email_address() Shows email address @@ -75,7 +75,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 ); /** - * Executes the email footer + * Executes the email footer. * * @hooked WC_Emails::email_footer() Output the email footer */ diff --git a/templates/emails/plain/customer-invoice.php b/templates/emails/plain/customer-invoice.php index 41d5c6f8520..6d8e49a322a 100644 --- a/templates/emails/plain/customer-invoice.php +++ b/templates/emails/plain/customer-invoice.php @@ -20,15 +20,23 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } -echo "= " . $email_heading . " =\n\n"; +echo '= ' . esc_html( $email_heading ) . " =\n\n"; if ( $order->has_status( 'pending' ) ) { - echo sprintf( __( 'An order has been created for you on %1$s. To pay for this order please use the following link: %2$s', 'woocommerce' ), get_bloginfo( 'name', 'display' ), $order->get_checkout_payment_url() ) . "\n\n"; + + echo sprintf( + /* translators: %1s item is the name of the site, %2s is a html link */ + esc_html__( 'An order has been created for you on %1$s. %2$s', 'woocommerce' ), + esc_html( get_bloginfo( 'name', 'display' ) ), + esc_url( $order->get_checkout_payment_url() ) + ) . "\n\n"; } echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n"; /** + * Hook for the woocommerce_email_order_details. + * * @hooked WC_Emails::order_details() Shows the order details table. * @hooked WC_Structured_Data::generate_order_data() Generates structured data. * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. @@ -39,11 +47,15 @@ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_tex echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n"; /** + * Hook for the woocommerce_email_order_meta. + * * @hooked WC_Emails::order_meta() Shows order meta data. */ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); /** + * Hook for woocommerce_email_customer_details + * * @hooked WC_Emails::customer_details() Shows customer details * @hooked WC_Emails::email_address() Shows email address */ @@ -51,4 +63,4 @@ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_ echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n"; -echo apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ); +echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );