Commit b3e64fe975e for woocommerce
commit b3e64fe975e9449048e1fc69595e1b528adde1e2
Author: Faisal Ahammad <faisalahammad24@gmail.com>
Date: Thu Jun 25 22:08:03 2026 +0600
Fix false 'unsaved changes' warning when editing orders with customer notes (#66001)
* fix(admin): customer note textarea id collides with WP core excerpt
- Change id="excerpt" to id="customer_note" in order data meta box
- WP core tracks #excerpt for unsaved-changes detection, triggering false beforeunload on order edit
- Fixes #65424
* Fix changelog entry format for changelogger validation
The entry used an unrecognized "Message:" header. Move the text to the
body after a blank line so `changelogger validate` passes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
diff --git a/plugins/woocommerce/changelog/fix-65424-order-edit-unsaved-changes-warning b/plugins/woocommerce/changelog/fix-65424-order-edit-unsaved-changes-warning
new file mode 100644
index 00000000000..527ec0193c3
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-65424-order-edit-unsaved-changes-warning
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Fix false "unsaved changes" warning when editing orders with customer notes
diff --git a/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php b/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php
index b040ea8013e..7f6df5b0a18 100644
--- a/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php
+++ b/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php
@@ -663,7 +663,7 @@ class WC_Meta_Box_Order_Data {
?>
<p class="form-field form-field-wide">
<label for="customer_note"><?php esc_html_e( 'Customer provided note', 'woocommerce' ); ?>:</label>
- <textarea rows="1" cols="40" name="customer_note" tabindex="6" id="excerpt" placeholder="<?php esc_attr_e( 'Customer notes about the order', 'woocommerce' ); ?>"><?php echo wp_kses( $order->get_customer_note(), array( 'br' => array() ) ); ?></textarea>
+ <textarea rows="1" cols="40" name="customer_note" tabindex="6" id="customer_note" placeholder="<?php esc_attr_e( 'Customer notes about the order', 'woocommerce' ); ?>"><?php echo wp_kses( $order->get_customer_note(), array( 'br' => array() ) ); ?></textarea>
</p>
<?php endif; ?>
</div>