From 2e2ce3c286602f8a81c85db38705b19b30078854 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 14 Nov 2014 12:52:40 +0000 Subject: [PATCH] [2.2] During refunds, correctly set shipping tax totals Fixes #6691 --- includes/abstracts/abstract-wc-order.php | 6 ++---- includes/admin/meta-boxes/views/html-order-refund.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 6ee6f03d89d..b1cf659c0d8 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -667,10 +667,8 @@ abstract class WC_Abstract_Order { $line_tax_data = maybe_unserialize( $item['taxes'] ); - if ( isset( $line_tax_data['total'] ) ) { - - foreach ( $line_tax_data['total'] as $tax_rate_id => $tax ) { - + if ( isset( $line_tax_data ) ) { + foreach ( $line_tax_data as $tax_rate_id => $tax ) { if ( ! isset( $order_shipping_taxes[ $tax_rate_id ] ) ) { $order_shipping_taxes[ $tax_rate_id ] = 0; } diff --git a/includes/admin/meta-boxes/views/html-order-refund.php b/includes/admin/meta-boxes/views/html-order-refund.php index 7da381367f9..350402fe8da 100644 --- a/includes/admin/meta-boxes/views/html-order-refund.php +++ b/includes/admin/meta-boxes/views/html-order-refund.php @@ -13,7 +13,7 @@ $who_refunded = new WP_User( $refund->post->post_author ); post->post_date ) ) ); + echo esc_attr__( 'Refund', 'woocommerce' ) . ' #' . absint( $refund->id ) . ' - ' . esc_attr( date_i18n( get_option( 'date_format' ) . ', ' . get_option( 'time_format' ), strtotime( $refund->post->post_date ) ) ); if ( $who_refunded->exists() ) { echo ' ' . esc_attr_x( 'by', 'Ex: Refund - $date >by< $username', 'woocommerce' ) . ' ' . '' . esc_attr( $who_refunded->display_name ) . '' ;