Commit 1b16dda53e for woocommerce
commit 1b16dda53ea5f6720297b0a7ec17e8b3410322a1
Author: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Date: Wed Jan 14 06:38:23 2026 -0800
Genericize (HPOS) order editor locking to work with order-subtypes (#62671)
* Genericize (HPOS) order editor locking to work with order-subtypes (like subscriptions).
* Prefer a single string that uses interpolation over concatenation (satisfy PHPCS).
* Add `@since` tag to new method.
* Simply: we do not need a top-level body class.
diff --git a/plugins/woocommerce/changelog/woosubs-1364-hpos-post-locking-for-subtypes b/plugins/woocommerce/changelog/woosubs-1364-hpos-post-locking-for-subtypes
new file mode 100644
index 0000000000..28567be0f8
--- /dev/null
+++ b/plugins/woocommerce/changelog/woosubs-1364-hpos-post-locking-for-subtypes
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Improve order editor locking support for sub-types (like subscriptions) when using HPOS.
diff --git a/plugins/woocommerce/client/legacy/js/admin/woocommerce_admin.js b/plugins/woocommerce/client/legacy/js/admin/woocommerce_admin.js
index 7713fd4e39..22d12e1486 100644
--- a/plugins/woocommerce/client/legacy/js/admin/woocommerce_admin.js
+++ b/plugins/woocommerce/client/legacy/js/admin/woocommerce_admin.js
@@ -707,7 +707,7 @@
var wc_order_lock = {
init: function() {
// Order screen.
- this.$lock_dialog = $( '.woocommerce_page_wc-orders #post-lock-dialog.order-lock-dialog' );
+ this.$lock_dialog = $( '#post-lock-dialog.order-lock-dialog' );
if ( 0 !== this.$lock_dialog.length && 'undefined' !== typeof woocommerce_admin_meta_boxes ) {
// We do not want WP's lock to interfere.
$( document ).off( 'heartbeat-send.refresh-lock' );
@@ -718,7 +718,7 @@
}
// Orders list table.
- this.$list_table = $( '.woocommerce_page_wc-orders table.wc-orders-list-table' );
+ this.$list_table = $( 'table.wc-orders-list-table' );
if ( 0 !== this.$list_table.length ) {
$( document ).on( 'heartbeat-send', this.send_orders_in_list );
$( document ).on( 'heartbeat-tick', this.check_orders_in_list );