From f685cda40d8de00df95bd294659675cf682b8e6b Mon Sep 17 00:00:00 2001 From: Jonathan Sadowski Date: Tue, 2 Mar 2021 09:34:00 -0600 Subject: [PATCH] Update wc-orders.js to resolve jQuery data change in jQuery 3 --- assets/js/admin/wc-orders.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/admin/wc-orders.js b/assets/js/admin/wc-orders.js index 018e6a23aa3..4fafc95ff81 100644 --- a/assets/js/admin/wc-orders.js +++ b/assets/js/admin/wc-orders.js @@ -45,12 +45,12 @@ jQuery( function( $ ) { */ WCOrdersTable.prototype.onPreview = function() { var $previewButton = $( this ), - $order_id = $previewButton.data( 'order-id' ); + $order_id = $previewButton.data( 'orderId' ); if ( $previewButton.data( 'order-data' ) ) { $( this ).WCBackboneModal({ template: 'wc-modal-view-order', - variable : $previewButton.data( 'order-data' ) + variable : $previewButton.data( 'orderData' ) }); } else { $previewButton.addClass( 'disabled' ); @@ -67,7 +67,7 @@ jQuery( function( $ ) { $( '.order-preview' ).removeClass( 'disabled' ); if ( response.success ) { - $previewButton.data( 'order-data', response.data ); + $previewButton.data( 'orderData', response.data ); $( this ).WCBackboneModal({ template: 'wc-modal-view-order',