Merged in feature/MAW-855-import-code-into-aws (pull request #2)

code import from pantheon

* code import from pantheon
This commit is contained in:
Tony Volpe
2023-12-04 23:08:14 +00:00
parent 8c9b1312bc
commit 8f4b5efda6
4766 changed files with 185592 additions and 239967 deletions

View File

@@ -675,6 +675,10 @@
// Order screen.
this.$lock_dialog = $( '.woocommerce_page_wc-orders #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' );
$( document ).off( 'heartbeat-tick.refresh-lock' );
$( document ).on( 'heartbeat-send', this.refresh_order_lock );
$( document ).on( 'heartbeat-tick', this.check_order_lock );
}
@@ -688,6 +692,7 @@
},
refresh_order_lock: function( e, data ) {
delete data['wp-refresh-post-lock'];
data['wc-refresh-order-lock'] = woocommerce_admin_meta_boxes.post_id;
},
@@ -725,7 +730,7 @@
},
send_orders_in_list: function( e, data ) {
data['wc-check-locked-orders'] = wc_order_lock.$list_table.find( 'tr input[name="order"]' ).map(
data['wc-check-locked-orders'] = wc_order_lock.$list_table.find( 'tr input[name="id[]"]' ).map(
function() { return this.value; }
).get();
},
@@ -735,7 +740,7 @@
wc_order_lock.$list_table.find( 'tr' ).each( function( i, tr ) {
var $tr = $( tr );
var order_id = $tr.find( 'input[name="order"]' ).val();
var order_id = $tr.find( 'input[name="id[]"]' ).val();
if ( locked_orders[ order_id ] ) {
if ( ! $tr.hasClass( 'wp-locked' ) ) {