diff --git a/assets/js/admin/meta-boxes-order.js b/assets/js/admin/meta-boxes-order.js index 01f51ba5e12..4616b0cbcd6 100644 --- a/assets/js/admin/meta-boxes-order.js +++ b/assets/js/admin/meta-boxes-order.js @@ -862,17 +862,17 @@ jQuery( function ( $ ) { if ( $( this ).is( 'tr' ) ) { $row = $( this ); } else { - $row = $( this ).closest('tr'); + $row = $( this ).closest( 'tr' ); } - var $table = $( this ).closest('table'); + var $table = $( this ).closest( 'table' ); if ( $row.is( '.selected' ) ) { - $row.removeClass('selected'); + $row.removeClass( 'selected' ); } else { - $row.addClass('selected'); + $row.addClass( 'selected' ); } - var $rows = $table.find('tr.selected'); + var $rows = $table.find( 'tr.selected' ); if ( $rows.length ) { $( 'div.wc-order-item-bulk-edit' ).slideDown(); @@ -890,7 +890,7 @@ jQuery( function ( $ ) { do_delete: function( e ) { e.preventDefault(); var $table = $( 'table.woocommerce_order_items' ); - var $rows = $table.find('tr.selected'); + var $rows = $table.find( 'tr.selected' ); if ( $rows.length && window.confirm( woocommerce_admin_meta_boxes.remove_item_notice ) ) { @@ -911,9 +911,9 @@ jQuery( function ( $ ) { data: data, type: 'POST', success: function() { - $rows.each(function() { + $rows.each( function() { $( this ).remove(); - }); + } ); wc_meta_boxes_order_items.unblock(); } }); @@ -925,7 +925,7 @@ jQuery( function ( $ ) { wc_meta_boxes_order_items.block(); var $table = $( 'table.woocommerce_order_items' ); - var $rows = $table.find('tr.selected'); + var $rows = $table.find( 'tr.selected' ); var quantities = {}; var item_ids = $.map( $rows, function( $row ) { return parseInt( $( $row ).data( 'order_item_id' ), 10 ); @@ -961,7 +961,7 @@ jQuery( function ( $ ) { wc_meta_boxes_order_items.block(); var $table = $( 'table.woocommerce_order_items' ); - var $rows = $table.find('tr.selected'); + var $rows = $table.find( 'tr.selected' ); var quantities = {}; var item_ids = $.map( $rows, function( $row ) { return parseInt( $( $row ).data( 'order_item_id' ), 10 ); diff --git a/includes/admin/meta-boxes/views/html-order-item.php b/includes/admin/meta-boxes/views/html-order-item.php index 55e01653690..c780f597d12 100644 --- a/includes/admin/meta-boxes/views/html-order-item.php +++ b/includes/admin/meta-boxes/views/html-order-item.php @@ -9,11 +9,11 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } -$product_link = $_product ? admin_url( 'post.php?post =' . absint( $_product->id ) . '&action =edit' ) : ''; -$thumbnail = $_product ? apply_filters( 'woocommerce_admin_order_item_thumbnail', $_product->get_image( 'thumbnail', array( 'title' => '' ), false ), $item_id, $item ) : ''; -$tax_data = empty( $legacy_order ) && wc_tax_enabled() ? maybe_unserialize( isset( $item['line_tax_data'] ) ? $item['line_tax_data'] : '' ) : false; -$item_total = ( isset( $item['line_total'] ) ) ? esc_attr( wc_format_localized_price( $item['line_total'] ) ) : ''; -$item_subtotal = ( isset( $item['line_subtotal'] ) ) ? esc_attr( wc_format_localized_price( $item['line_subtotal'] ) ) : ''; +$product_link = $_product ? admin_url( 'post.php?post=' . absint( $_product->id ) . '&action=edit' ) : ''; +$thumbnail = $_product ? apply_filters( 'woocommerce_admin_order_item_thumbnail', $_product->get_image( 'thumbnail', array( 'title' => '' ), false ), $item_id, $item ) : ''; +$tax_data = empty( $legacy_order ) && wc_tax_enabled() ? maybe_unserialize( isset( $item['line_tax_data'] ) ? $item['line_tax_data'] : '' ) : false; +$item_total = ( isset( $item['line_total'] ) ) ? esc_attr( wc_format_localized_price( $item['line_total'] ) ) : ''; +$item_subtotal = ( isset( $item['line_subtotal'] ) ) ? esc_attr( wc_format_localized_price( $item['line_subtotal'] ) ) : ''; ?>