Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/woocommerce/changelog/trunk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Escape the default 'thank you' text instead of the filtered message.
7 changes: 4 additions & 3 deletions plugins/woocommerce/templates/checkout/order-received.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php

Check notice on line 1 in plugins/woocommerce/templates/checkout/order-received.php

View workflow job for this annotation

GitHub Actions / Check pull request changes to highlight

TEMPLATES

Version bump found
/**
* "Order received" message.
*
Expand All @@ -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
*/
Expand All @@ -32,10 +32,11 @@
*/
$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;
YordanSoares marked this conversation as resolved.
Show resolved Hide resolved
?>
</p>