Escape the default "Thank you" text instead of the filtered message (#40353)

* Escape the default "Thank you" text instead of the filtered message

Closes: #40329 and #40352

* Update plugins/woocommerce/templates/checkout/order-received.php

Co-authored-by: Leif Singer <github.2017@singer.sh>

* Bump template version to 8.3.0

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: Leif Singer <github.2017@singer.sh>
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Yordan Soares 2023-09-25 14:41:45 +02:00 committed by GitHub
parent 0b2ad50a21
commit b2bbe5e56a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Escape the default 'thank you' text instead of the filtered message.

View File

@ -12,7 +12,7 @@
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 8.1.0
* @version 8.3.0
*
* @var WC_Order|false $order
*/
@ -32,10 +32,11 @@ defined( 'ABSPATH' ) || exit;
*/
$message = apply_filters(
'woocommerce_thankyou_order_received_text',
__( 'Thank you. Your order has been received.', 'woocommerce' ),
esc_html( __( 'Thank you. Your order has been received.', 'woocommerce' ) ),
$order
);
echo esc_html( $message );
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $message;
?>
</p>