Commit 0b4a5791117 for woocommerce

commit 0b4a57911171ab9939a1c306060ba3ac23931f3a
Author: Oleksandr Aratovskyi <79862886+oaratovskyi@users.noreply.github.com>
Date:   Wed Sep 2 15:38:33 2026 +0300

    Document failed order message customization (#68254)

    * docs: Add failed order message customization snippet

    Refs #52517

    * docs: Make failed order snippet message translatable

    The example may be copied into a plugin or theme, where its customer-facing message should be available to that project's translation catalog. The literal message could not be extracted, while using WooCommerce's text domain would not cover a custom string.

    Wrap the message with a placeholder text domain, add translator context for the order-number placeholder, and explain how to replace the domain.

    Refs #52517

diff --git a/docs/code-snippets/customize-failed-order-message.md b/docs/code-snippets/customize-failed-order-message.md
new file mode 100644
index 00000000000..379421530f0
--- /dev/null
+++ b/docs/code-snippets/customize-failed-order-message.md
@@ -0,0 +1,32 @@
+---
+post_title: Customize the failed order message
+sidebar_label: Customize the failed order message
+---
+
+# Customize the failed order message
+
+WooCommerce displays a message on the order confirmation page when an order fails. In WooCommerce 11.2 and later, use the `woocommerce_thankyou_order_failed_text` filter to customize this message in both the classic and block-based order confirmation pages.
+
+The filter receives the current message and the failed order, so the message can include order details:
+
+When packaging this snippet in a plugin or theme, replace `your-text-domain` with the plugin or theme's text domain so its translation catalog can include the message.
+
+```php
+/**
+ * Customize the message shown for failed orders.
+ *
+ * @param string   $message Current failed order message.
+ * @param WC_Order $order   Failed order.
+ * @return string
+ */
+function your_prefix_customize_failed_order_message( $message, $order ) {
+	return sprintf(
+		/* translators: %s: Order number. */
+		__( 'We could not process order #%s. Please try again or contact us for help.', 'your-text-domain' ),
+		esc_html( $order->get_order_number() )
+	);
+}
+add_filter( 'woocommerce_thankyou_order_failed_text', 'your_prefix_customize_failed_order_message', 10, 2 );
+```
+
+The callback must return a string. Safe inline HTML is allowed and is sanitized before WooCommerce displays it.